receipt_infopage.vue 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691
  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 icon_transport transport-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 icon_transport transport-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 icon_transport transport-shiwujiaoxing"></text>
  23. {{ infoDATA.emergencyType.name }}
  24. </text>
  25. </view>
  26. </view>
  27. <view class="page_item_top_R">
  28. <text class="L_iocn" v-if="
  29. !(
  30. infoDATA.gdState.value == 5 &&
  31. infoDATA.taskType.associationType.value == 'inspect'
  32. )
  33. ">{{ infoDATA.gdState.name }}</text>
  34. <text class="L_iocn" v-if="
  35. infoDATA.gdState.value == 5 &&
  36. infoDATA.taskType.associationType.value == 'inspect'
  37. ">待送回</text>
  38. </view>
  39. <view class="L"></view>
  40. <view class="R"></view>
  41. </view>
  42. <view class="page_item_cont">
  43. <view class="page_item_cont_T">
  44. <view class="page_item_cont_title">
  45. <text> <text class="starting">起</text> 点科室 </text>
  46. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  47. </view>
  48. </view>
  49. <view class="line"></view>
  50. <view class="page_item_cont_B">
  51. <view class="page_item_cont_title" v-for="(dept, index) of infoDATA.middleDept" :key="'ico' + index">
  52. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  53. <text> <text class="End">检</text> 查科室 </text>
  54. <text class="text_big">{{ dept.dept }}</text>
  55. <view></view>
  56. </view>
  57. </view>
  58. <template v-if="infoDATA.taskType.associationType.value != 'inspect'">
  59. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  60. <view>
  61. <text> <text class="End">终</text> 点科室 </text>
  62. <text class="text_big">{{ dept.dept }}</text>
  63. </view>
  64. </view>
  65. </template>
  66. <view v-if="
  67. infoDATA.taskType.associationType.value == 'inspect' ||
  68. infoDATA.taskType.associationType.value == 'patientTransport'
  69. ">
  70. <!-- 待抢单 -->
  71. <text class="red" v-if="infoDATA.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  72. <!-- 待到达 -->
  73. <text class="red" v-if="infoDATA.gdState.value == 4">请扫描患者腕带</text>
  74. <!-- 执行中 -->
  75. <text class="red" v-if="infoDATA.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  76. <!-- 待送达 -->
  77. <text class="red" v-if="infoDATA.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="page_item_foot">
  82. <view class="page_item_foot_text">
  83. <text class="text1">状态</text>
  84. <text class="text2" v-if="
  85. !(
  86. infoDATA.gdState.value == 5 &&
  87. infoDATA.taskType.associationType.value == 'inspect'
  88. )
  89. ">{{ infoDATA.gdState.name }}</text>
  90. <text class="text2" v-if="
  91. infoDATA.gdState.value == 5 &&
  92. infoDATA.taskType.associationType.value == 'inspect'
  93. ">待送回</text>
  94. </view>
  95. <!-- <view class="page_item_foot_text">
  96. <text class="text1">关联类型</text>
  97. <text class="text2">{{ infoDATA.taskType.associationType.name }}</text>
  98. </view> -->
  99. <view class="page_item_foot_text">
  100. <text class="text1">任务类型</text>
  101. <text class="text2">{{ infoDATA.taskType.taskName }}<template
  102. v-if="infoDATA.goodsRemark">-{{infoDATA.goodsRemark}}</template></text>
  103. </view>
  104. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value==='inspect'">
  105. <text class="text1">是否半程陪检</text>
  106. <text class="text2">{{ infoDATA.isHalfInspect===1?'是':'否' }}</text>
  107. </view>
  108. <view class="page_item_foot_text">
  109. <text class="text1">执行人员</text>
  110. <text class="text2">{{ infoDATA.worker?infoDATA.worker.name:'-' }}</text>
  111. </view>
  112. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  113. <text class="text1">预计响应时间</text>
  114. <text class="text2">{{ infoDATA.estimeResponseTime || '无' }}</text>
  115. </view>
  116. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  117. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  118. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  119. <text class="text2">{{ infoDATA.estimeCompleteTime || '无' }}</text>
  120. </view>
  121. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  122. <text class="text1">预计到达时间</text>
  123. <text class="text2">{{ infoDATA.estimateArriveTime || '无' }}</text>
  124. </view>
  125. <view class="page_item_foot_text">
  126. <text class="text1">创建时间</text>
  127. <text class="text2">{{ infoDATA.startTime || '无' }}</text>
  128. </view>
  129. <view class="page_item_foot_text">
  130. <text class="text1">预约时间</text>
  131. <text class="text2" v-if="infoDATA.taskType.associationType.value == 'inspect'">{{ infoDATA.yyTime }}</text>
  132. <text class="text2"
  133. v-if="infoDATA.taskType.associationType.value == 'patientTransport'">{{ infoDATA.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">床号</text>
  140. <text class="text2">{{
  141. infoDATA.patient ? infoDATA.patient.bedNum : "-"
  142. }}</text>
  143. </view>
  144. <view class="page_item_foot_text" v-if="
  145. infoDATA.taskType.associationType.value == 'inspect' ||
  146. infoDATA.taskType.associationType.value == 'patientTransport'
  147. ">
  148. <text class="text1">携带设备</text>
  149. <text class="text2">{{ infoDATA.goods || "暂无" }}</text>
  150. </view>
  151. <view class="page_item_info" style="padding: 0;" v-if="infoDATA.workOrderRemark !== undefined">
  152. <view class="page_item_foot_text">
  153. <view class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport'">备注信息</view>
  154. <view class="text1" v-else>工单备注</view>
  155. <view class="text2" style="float: none;word-break: break-all;">{{ infoDATA.workOrderRemark }}</view>
  156. </view>
  157. </view>
  158. <view class="page_item_foot_text" v-if="
  159. infoDATA.taskType.associationType.value == 'inspect' ||
  160. infoDATA.taskType.associationType.value == 'patientTransport'
  161. ">
  162. <text class="text1">患者姓名</text>
  163. <text class="text2">{{ infoDATA.patient.patientName }}({{
  164. infoDATA.patient.residenceNo
  165. }})</text>
  166. </view>
  167. <view class="page_item_foot_text" v-if="
  168. (infoDATA.taskType.associationType.value == 'inspect' ||
  169. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.careLevel
  170. ">
  171. <text class="text1">{{infoDATA.patient.careLevel.desc}}</text>
  172. <text class="text2"
  173. :class="[(infoDATA.patient.careLevel.value==0||infoDATA.patient.careLevel.value==1)?'red':'green']">{{infoDATA.patient.careLevel.name}}</text>
  174. </view>
  175. <view class="page_item_foot_text" v-if="
  176. (infoDATA.taskType.associationType.value == 'inspect' ||
  177. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.illnessState
  178. ">
  179. <text class="text1">{{infoDATA.patient.illnessState.desc}}</text>
  180. <text class="text2"
  181. :class="{red:infoDATA.patient.illnessState.value==2||infoDATA.patient.illnessState.value==3}">{{infoDATA.patient.illnessState.name}}</text>
  182. </view>
  183. <view class="page_item_foot_text"
  184. v-if="
  185. (infoDATA.taskType.associationType.value == 'inspect' ||
  186. infoDATA.taskType.associationType.value == 'patientTransport')&&(infoDATA.isAccompany===1||infoDATA.isAccompany===0)">
  187. <text class="text1">陪同情况</text>
  188. <text class="text2"
  189. :class="{red:infoDATA.isAccompany===1}">{{ infoDATA.isAccompany===1?'需要医护陪同':'无需医护陪同'}}</text>
  190. </view>
  191. <view class="page_item_foot_text"
  192. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectScore">
  193. <text class="text1">陪检方式</text>
  194. <text class="text2">{{ infoDATA.inspectScore.inspectMode }}</text>
  195. </view>
  196. <view class="page_item_foot_text"
  197. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsers">
  198. <text class="text1">陪检人员</text>
  199. <text class="text2">{{ infoDATA.inspectUsers }}</text>
  200. </view>
  201. <view class="page_item_foot_text"
  202. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsersNum">
  203. <text class="text1">陪检人数</text>
  204. <text class="text2">{{ infoDATA.inspectUsersNum }}</text>
  205. </view>
  206. </view>
  207. <!-- 药包 -->
  208. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  209. <text class="page_item_info_title">药包编码</text>
  210. <text class="text">{{ infoDATA.drugs?infoDATA.drugs.packid:'无' }}</text>
  211. </view>
  212. <!-- 血制品 -->
  213. <view class="page_item_info" v-if="
  214. infoDATA.taskType.associationType.value == 'ordinary' &&
  215. infoDATA.taskType.ordinaryField.value == 'blood'
  216. ">
  217. <view>
  218. <text class="page_item_info_title">·</text>
  219. <text class="text">
  220. 送达数量
  221. <text class="page_item_info_txt">{{infoDATA.deliveryNum || '无'}}</text>
  222. </text>
  223. <text class="text">
  224. 实收数量
  225. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  226. </text>
  227. <text class="text">
  228. 应收数量
  229. <text class="page_item_info_txt">{{infoDATA.expectReceiveNum || '无'}}</text>
  230. </text>
  231. </view>
  232. </view>
  233. <!-- 标本 -->
  234. <view class="page_item_info" v-if="
  235. infoDATA.taskType.associationType.value == 'specimen' ||
  236. infoDATA.taskType.associationType.value == 'specimenPlan'
  237. ">
  238. <view>
  239. <text class="page_item_info_title">标本信息</text>
  240. <text class="text">
  241. 预计接收
  242. <text class="page_item_info_txt">{{
  243. infoDATA.expectReceiveNum || '无'
  244. }}</text>
  245. </text>
  246. <text class="text"
  247. v-if="infoDATA.gdState.value == 5 || infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  248. 扫描接收
  249. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  250. </text>
  251. <text class="text" v-if="infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  252. 实际送达
  253. <text class="page_item_info_txt">{{actualDelivery || '无'}}</text>
  254. </text>
  255. </view>
  256. <view v-for="spe in infoDATA.specimenSet" :key="spe.id" class="spe_list">
  257. <view>
  258. <text class="page_item_info_title">标本类型</text>
  259. <text class="text">{{ spe.stype ? spe.stype.name : "-" }}({{
  260. spe.urgent == 1 ? "急" : "普"
  261. }})</text>
  262. </view>
  263. <view>
  264. <text class="page_item_info_title">标本编码</text>
  265. <text class="text">{{ spe.scode }}</text>
  266. </view>
  267. <view>
  268. <text class="page_item_info_title">患者姓名</text>
  269. <text class="text">{{ spe.patientName }}<text v-if="spe.bedNum">({{spe.bedNum}})</text></text>
  270. </view>
  271. <view>
  272. <text class="page_item_info_title">目标科室</text>
  273. <text class="text">{{
  274. spe.checkDept ? spe.checkDept.dept : "-"
  275. }}</text>
  276. </view>
  277. </view>
  278. </view>
  279. <!-- 静配 -->
  280. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  281. <text class="page_item_info_title">药包编码</text>
  282. <text class="text">{{ infoDATA.staticDistri?infoDATA.staticDistri.packid:'无' }}</text>
  283. </view>
  284. <!-- 陪检 -->
  285. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  286. <view class="page_item_info">
  287. <text class="page_item_info_title">检查信息</text>
  288. </view>
  289. <view id="infos" :animation="animationData">
  290. <view class="page_item_infos" v-for="(item, index) of infoDATA.checkList" :key="index">
  291. <view class="page_item_info2">
  292. <view class="page_item_foot_text">
  293. <text class="text1">检查科室</text>
  294. <text class="text2">{{ item.execDept?item.execDept.dept:'-' }}</text>
  295. </view>
  296. <view class="page_item_foot_text">
  297. <text class="text1">检查项</text>
  298. <text class="text2">{{ item.inspectName||'-' }}</text>
  299. </view>
  300. <view class="page_item_foot_text">
  301. <text class="text1">叫号信息</text>
  302. <text class="text2">{{ item.reservationNumber||'-' }}</text>
  303. </view>
  304. <view class="page_item_foot_text">
  305. <text class="text1">预约时间</text>
  306. <text class="text2">{{ item.yyTime || "-" }}</text>
  307. </view>
  308. <!-- <view class="page_item_foot_text"
  309. v-show="item.inspectState.value==1||item.inspectState.value==2||item.inspectState.value==4">
  310. <view class="btn" @click.stop="remove(item)">移除</view>
  311. </view> -->
  312. <view class="page_item_foot_text">
  313. <view class="btn" @click.stop="remove(item)">移除</view>
  314. </view>
  315. </view>
  316. </view>
  317. </view>
  318. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  319. 点击可查看检查详情
  320. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia"></text>
  321. </view>
  322. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  323. 点击可收起检查详情
  324. <text class="cubeic-pullup icon_transport transport-paixujiantoushang"></text>
  325. </view>
  326. </view>
  327. </view>
  328. <view class="foot_btn2 footerPadding">
  329. <view class="btn2" @click="showAlert" v-if="infoDATA.gdState.value == 2">接单</view>
  330. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  331. <template
  332. v-if="((!infoDATA.worker)||(infoDATA.worker&&infoDATA.worker.id == currentUserId))&&infoDATA.gdState.value != 6&&infoDATA.gdState.value != 7&&infoDATA.gdState.value != 11">
  333. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  334. infoDATA.gdState.value != 2 &&
  335. infoDATA.taskType.associationType.value != 'jPBag' &&
  336. infoDATA.taskType.associationType.value != 'drugsBag' &&
  337. infoDATA.taskType.associationType.value != 'specimen' &&
  338. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  339. infoDATA.taskType.associationType.value != 'ordinary' &&
  340. !(infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch)
  341. " hover-class="seimin-btn-hover">
  342. <smallScreen :sData="infoDATA" :sType="1">扫码</smallScreen>
  343. </view>
  344. <!-- 其他临床服务-完成工单-待送达 -->
  345. <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>
  346. <!-- 其他临床服务-拍照 -->
  347. <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>
  348. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" @click="photograph(infoDATA)" v-if="
  349. infoDATA.taskType.associationType.value != 'jPBag' &&
  350. infoDATA.taskType.associationType.value != 'drugsBag' &&
  351. infoDATA.taskType.associationType.value != 'specimen' &&
  352. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  353. infoDATA.taskType.associationType.value != 'other' &&
  354. infoDATA.taskType.associationType.value != 'ordinary' &&
  355. infoDATA.gdState.value == 4
  356. " hover-class="seimin-btn-hover">拍照</view>
  357. <view class="btn3" @click="specialCloseClick()" v-if="
  358. infoDATA.gdState.value != 2 &&
  359. infoDATA.taskType.associationType.value != 'jPBag' &&
  360. infoDATA.taskType.associationType.value != 'drugsBag' &&
  361. infoDATA.taskType.associationType.value != 'specimen' &&
  362. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  363. infoDATA.taskType.associationType.value != 'ordinary' &&
  364. infoDATA.taskType.specialCloseButton == 1
  365. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  366. </template>
  367. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  368. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  369. infoDATA.gdState.value != 2 &&
  370. infoDATA.taskType.associationType.value != 'patientTransport' &&
  371. infoDATA.taskType.associationType.value != 'inspect' &&
  372. infoDATA.taskType.associationType.value != 'other' &&
  373. infoDATA.taskType.associationType.value != 'ordinary'
  374. " hover-class="seimin-btn-hover">
  375. <smallScreen :sData="infoDATA" :sType="2">扫码</smallScreen>
  376. </view>
  377. <!-- 如果是万能交接 -->
  378. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']"
  379. v-if="infoDATA.taskType.associationType.value == 'ordinary'"
  380. hover-class="seimin-btn-hover" @click="goBack()">
  381. 知道了
  382. </view>
  383. <view class="btn3" @click="specialCloseClick()" v-if="
  384. infoDATA.gdState.value != 2 &&
  385. infoDATA.taskType.associationType.value != 'patientTransport' &&
  386. infoDATA.taskType.associationType.value != 'inspect' &&
  387. infoDATA.taskType.associationType.value != 'other' &&
  388. infoDATA.taskType.specialCloseButton == 1
  389. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  390. <view class="btn3" @click="viewSpecimen(infoDATA)" v-if="
  391. infoDATA.taskType.associationType.value == 'specimen' ||
  392. infoDATA.taskType.associationType.value == 'specimenPlan'
  393. " hover-class="seimin-btn-hover">查看标本</view>
  394. <view class="btn3" @click="viewDrugsBag(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'drugsBag'" hover-class="seimin-btn-hover">查看业务流程</view>
  395. <view class="btn3" @click="viewBlood(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'ordinary' && infoDATA.taskType.ordinaryField.value == 'blood'" hover-class="seimin-btn-hover">查看血制品</view>
  396. <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>
  397. </view>
  398. <!-- 弹窗 -->
  399. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  400. @know="know" :operate="models.operate" @ok="ok" @cancel="cancel" :textareaFlag="textareaFlag"
  401. @textareaInput="textareaInput"></showModel>
  402. <!-- 弹窗 -->
  403. <inspectRemoveModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  404. :content="models1.content" @know="know1" :operate="models1.operate" @ok="ok1" @cancel="cancel1" :remove="true">
  405. </inspectRemoveModel>
  406. <!-- 填写交接人账号弹窗 -->
  407. <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  408. @cancel="hosCancel">
  409. </selectAccount>
  410. </view>
  411. </template>
  412. <script>
  413. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  414. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  415. import {
  416. get,
  417. post,
  418. SM,
  419. webHandle
  420. } from "../../http/http.js";
  421. import {
  422. pathUrl,
  423. photographTool
  424. } from "../../tools/photograph.js";
  425. export default {
  426. components: {
  427. selectAccount,
  428. },
  429. data() {
  430. return {
  431. // 填写交接人账号弹窗model
  432. hosModels: {
  433. disjunctor: false,
  434. },
  435. currentCode: '', //当前拍照使用的科室二维码
  436. currentData: {}, //当前小扫描的工单对象
  437. multiplayerMode: 0,
  438. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  439. SMFlag:true,
  440. actualDelivery: 0,
  441. currentUserId: 0,
  442. // 弹窗model
  443. models: {
  444. disjunctor: false,
  445. },
  446. // 弹窗model1
  447. models1: {
  448. disjunctor: false,
  449. },
  450. currentInspect: null,
  451. showType: "show",
  452. infoDATA: {},
  453. dataId: "",
  454. animationData: {},
  455. // 特殊情况关闭原因开关
  456. textareaFlag: false,
  457. textareaText: "",
  458. };
  459. },
  460. filters: {
  461. // 自定义管道 yyTime
  462. yyTimeFilter: function(data) {
  463. if (data) {
  464. let nDate = null;
  465. if (typeof data == 'string') {
  466. let arr = data.split(/[-:\s]/);
  467. nDate = new Date(
  468. arr[0] - 0,
  469. arr[1] - 1,
  470. arr[2] - 0,
  471. arr[3] - 0,
  472. arr[4] - 0,
  473. 0
  474. );
  475. } else if (typeof data == 'number') {
  476. nDate = new Date(data);
  477. }
  478. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  479. const date = nDate.getDate().toString().padStart(2, 0);
  480. const hour = nDate.getHours().toString().padStart(2, 0);
  481. const minute = nDate.getMinutes().toString().padStart(2, 0);
  482. return `${month}-${date} ${hour}:${minute}`;
  483. } else {
  484. return "-";
  485. }
  486. },
  487. },
  488. methods: {
  489. // 前往其他临床服务完成工单确认页面
  490. otherCompleteOrder(data){
  491. console.log(data);
  492. uni.navigateTo({
  493. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  494. });
  495. },
  496. // 如果不是静配,药配,标本配送,标本轮巡
  497. // 科室签到(小扫描)-拍照
  498. nextDeptOrder_ss(data, accountObj) {
  499. console.log(this.currentCode);
  500. let isKs = 0;
  501. let ids = [];
  502. let id = data.id;
  503. ids.push(id);
  504. let list = {
  505. code: "",
  506. ids: ids,
  507. };
  508. let code = "";
  509. let type = "";
  510. if (this.currentCode) {
  511. let gdStateValue = data.gdState.value; //工单状态value
  512. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  513. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  514. if (
  515. (associationTypeValue == "other" &&
  516. gdStateValue == "4") ||
  517. gdStateValue == "5"
  518. ) {
  519. code = this.currentCode;
  520. type = "orderSign/" + code;
  521. list = {
  522. ids
  523. };
  524. if (accountObj) {
  525. list.handover = [accountObj.accountId];
  526. }
  527. isKs = 1;
  528. }
  529. uni.showLoading({
  530. title: "加载中",
  531. mask: true,
  532. });
  533. post("/workerOrder/" + type, list).then((res) => {
  534. uni.hideLoading();
  535. if (res) {
  536. if (res.status == 200) {
  537. if (
  538. gdStateValue == "4" &&
  539. associationTypeValue == "other"
  540. ) {
  541. uni.navigateTo({
  542. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  543. });
  544. }
  545. if (gdStateValue == "5") {
  546. uni.navigateTo({
  547. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  548. });
  549. }
  550. } else {
  551. uni.navigateTo({
  552. url: `../../pages/scanning_Result/scanning_Result?type=${
  553. associationTypeValue
  554. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  555. res.msg
  556. }&isKs=${isKs}&model=${encodeURIComponent(
  557. JSON.stringify(res)
  558. )}&qrcode=${this.currentCode}`,
  559. });
  560. }
  561. } else {
  562. uni.navigateTo({
  563. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  564. });
  565. }
  566. });
  567. }
  568. },
  569. // 填写交接人账号-确认
  570. hosOk(data) {
  571. console.log(data);
  572. const {
  573. accountName,
  574. account,
  575. accountId
  576. } = data;
  577. if (!accountName && !account) {
  578. //没有填写交接人
  579. uni.showModal({
  580. title: '提示',
  581. content: "请填写交接人账号!",
  582. showCancel: false,
  583. success: function(res) {
  584. if (res.confirm) {
  585. console.log('用户点击确定');
  586. } else if (res.cancel) {
  587. console.log('用户点击取消');
  588. }
  589. }
  590. });
  591. return;
  592. } else if (!accountName && account || accountName && !account) {
  593. //没有填写交接人
  594. uni.showModal({
  595. title: '提示',
  596. content: "请填写正确的交接人账号!",
  597. showCancel: false,
  598. success: function(res) {
  599. if (res.confirm) {
  600. console.log('用户点击确定');
  601. } else if (res.cancel) {
  602. console.log('用户点击取消');
  603. }
  604. }
  605. });
  606. return;
  607. }
  608. this.hosModels.disjunctor = false;
  609. let associationTypeValue = this.currentData.taskType.associationType.value;
  610. console.log(associationTypeValue)
  611. this.uploadToOther(this.currentData, data, 'start');
  612. },
  613. // 填写交接人账号-取消
  614. hosCancel() {
  615. this.hosModels.disjunctor = false;
  616. },
  617. // 填写交接人账号弹窗
  618. showSelectAccount() {
  619. this.hosModels = {
  620. title: '填写交接人账号',
  621. disjunctor: true,
  622. }
  623. },
  624. // 拍照-上传
  625. uploadToOther(data, accountObj, type){
  626. // 其他临床服务拍照签到
  627. console.log(data, 1111);
  628. let id_seimin;
  629. let asTypeValue_seimin;
  630. let gdStateValue_seimin;
  631. if (data.status != 200 && data.status !== undefined) {
  632. id_seimin = data.id;
  633. asTypeValue_seimin = data.type;
  634. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  635. } else {
  636. id_seimin = data.id;
  637. asTypeValue_seimin = data.taskType.associationType.value;
  638. gdStateValue_seimin = data.gdState.value;
  639. }
  640. //#ifdef H5
  641. uni.chooseImage({
  642. count: 1,
  643. sourceType: ['camera'],
  644. success: (chooseImageRes) => {
  645. console.log(chooseImageRes, pathUrl)
  646. const tempFilePaths = chooseImageRes.tempFilePaths;
  647. const tempFiles = chooseImageRes.tempFiles;
  648. let tp = tempFilePaths[0];
  649. uni.showLoading({
  650. mask: true,
  651. title: '加载中'
  652. });
  653. post('/workerOrder/findRecordInfoByOrderId', {
  654. orderId: id_seimin,
  655. gdOperate: 21,
  656. }).then(result => {
  657. console.log(result)
  658. if (result.state == 200) {
  659. uni.getImageInfo({
  660. src: tp,
  661. success: (res) => {
  662. console.log('压缩前', res)
  663. let canvasWidth = res.width //图片原始长宽
  664. let canvasHeight = res.height
  665. let img = new Image()
  666. img.src = res.path
  667. let canvas = document.createElement('canvas');
  668. let ctx = canvas.getContext('2d')
  669. canvas.width = canvasWidth
  670. canvas.height = canvasHeight
  671. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  672. canvas.toBlob((fileSrc) => {
  673. tp = window.URL.createObjectURL(fileSrc)
  674. console.log('压缩后', tp);
  675. uni.uploadFile({
  676. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  677. filePath: tp,
  678. name: 'file',
  679. formData: {
  680. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  681. 0].path.split(
  682. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  683. },
  684. success: (uploadFileRes) => {
  685. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  686. this.nextDeptOrder_ss(data, accountObj, type);
  687. },
  688. fail: err => {
  689. console.error(err);
  690. uni.hideLoading();
  691. uni.showToast({
  692. icon: 'none',
  693. title: '上传失败',
  694. duration: 2000
  695. });
  696. }
  697. });
  698. }, 'image/jpeg', 0.3)
  699. },
  700. fail: function () {
  701. uni.hideLoading();
  702. uni.showToast({
  703. icon: 'none',
  704. title: '上传失败',
  705. duration: 2000
  706. });
  707. }
  708. })
  709. } else {
  710. uni.hideLoading();
  711. uni.showToast({
  712. icon: "none",
  713. title: "请求失败!",
  714. });
  715. }
  716. })
  717. }
  718. });
  719. //#endif
  720. //#ifdef APP-PLUS
  721. uni.chooseImage({
  722. count: 1,
  723. sourceType: ['camera'],
  724. sizeType: ['compressed'],
  725. success: (chooseImageRes) => {
  726. console.log(chooseImageRes, pathUrl)
  727. const tempFilePaths = chooseImageRes.tempFilePaths;
  728. const tempFiles = chooseImageRes.tempFiles;
  729. let tp = tempFilePaths[0];
  730. uni.showLoading({
  731. mask: true,
  732. title: '加载中'
  733. });
  734. post('/workerOrder/findRecordInfoByOrderId', {
  735. orderId: id_seimin,
  736. gdOperate: 21,
  737. }).then(result => {
  738. console.log(result)
  739. if (result.state == 200) {
  740. uni.compressImage({
  741. src: tp,
  742. quality: 30,
  743. success: (res) => {
  744. console.log('压缩前', res)
  745. tp = res.tempFilePath;
  746. console.log('压缩后', tp);
  747. uni.uploadFile({
  748. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  749. filePath: tp,
  750. name: 'file',
  751. formData: {
  752. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  753. 0].path.split(
  754. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  755. },
  756. success: (uploadFileRes) => {
  757. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  758. this.nextDeptOrder_ss(data, accountObj, type);
  759. },
  760. fail: err => {
  761. console.error(err);
  762. uni.hideLoading();
  763. uni.showToast({
  764. icon: 'none',
  765. title: '上传失败',
  766. duration: 2000
  767. });
  768. }
  769. });
  770. },
  771. fail: function () {
  772. uni.hideLoading();
  773. uni.showToast({
  774. icon: 'none',
  775. title: '上传失败',
  776. duration: 2000
  777. });
  778. }
  779. })
  780. } else {
  781. uni.hideLoading();
  782. uni.showToast({
  783. icon: "none",
  784. title: "请求失败!",
  785. });
  786. }
  787. })
  788. }
  789. });
  790. //#endif
  791. },
  792. // 拍照-其他
  793. async photographToOther(data, type) {
  794. this.currentData = data;
  795. uni.showLoading({
  796. title: "加载中",
  797. mask: true,
  798. });
  799. // 其他临床服务
  800. let result = await post("/dept/scanning", {
  801. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  802. taskTypeId: data.taskType.id,
  803. gdState: data.gdState.id,
  804. });
  805. uni.hideLoading();
  806. this.currentCode = result.code;
  807. if (result.state == 200 || result.state == 201) {
  808. uni.showModal({
  809. title: '提示',
  810. content: '请尽量拍摄角度覆盖清洁区域?',
  811. success: (res) => {
  812. if (res.confirm) {
  813. if (result.account) {
  814. this.uploadToOther(data, {
  815. account: result.account,
  816. accountName: result.name,
  817. accountId: result.id,
  818. }, type);
  819. } else {
  820. this.uploadToOther(data, undefined, type);
  821. }
  822. } else if (res.cancel) {
  823. console.log('用户点击取消');
  824. }
  825. }
  826. });
  827. } else if (result.state == '0000') {
  828. this.showSelectAccount();
  829. } else {
  830. uni.showToast({
  831. icon: "none",
  832. title: "请求失败!",
  833. });
  834. }
  835. },
  836. goBack() {
  837. uni.navigateTo({
  838. url: "../receiptpage/receiptpage",
  839. });
  840. },
  841. // 查看标本
  842. viewSpecimen(workOrder) {
  843. uni.navigateTo({
  844. url: `../specimenDetail/specimenDetail?workOrderId=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}`,
  845. });
  846. },
  847. // 查看药品业务数据
  848. viewDrugsBag(workOrder) {
  849. uni.navigateTo({
  850. url: `../drugsBagHistory/drugsBagHistory?id=${workOrder.drugs.id}&packid=${workOrder.drugs.packid}`,
  851. });
  852. },
  853. // 查看血制品
  854. viewBlood(workOrder) {
  855. uni.showLoading({
  856. title: "加载中",
  857. mask: true,
  858. });
  859. post('/transflow/checkData', {
  860. "type": "blood",
  861. "orderId": workOrder.id
  862. }).then(res => {
  863. uni.hideLoading();
  864. if(res.state == 200){
  865. uni.navigateTo({
  866. url: `../blood_list/blood_list?bloods=${encodeURIComponent(JSON.stringify(res.data.all))}`,
  867. });
  868. }else{
  869. uni.showToast({
  870. icon: "none",
  871. title: "请求失败!",
  872. });
  873. }
  874. })
  875. },
  876. // 移除检查->知道了
  877. know1() {
  878. this.models1.disjunctor = false;
  879. // this.getInfo(this.dataId);
  880. uni.navigateTo({
  881. url: '../receiptpage/receiptpage',
  882. });
  883. },
  884. // 移除检查->确定
  885. ok1(data) {
  886. console.log(data);
  887. const {
  888. value,
  889. yyTime
  890. } = data;
  891. if (!value) {
  892. //没有选择移除原因
  893. uni.showModal({
  894. title: "提示",
  895. content: "请选择移除原因!",
  896. showCancel: false,
  897. success: function(res) {
  898. if (res.confirm) {
  899. console.log("用户点击确定");
  900. } else if (res.cancel) {
  901. console.log("用户点击取消");
  902. }
  903. },
  904. });
  905. return;
  906. } else if (value == 2 && !yyTime) {
  907. //没有填写预约时间
  908. uni.showModal({
  909. title: "提示",
  910. content: "请填写预约时间!",
  911. showCancel: false,
  912. success: function(res) {
  913. if (res.confirm) {
  914. console.log("用户点击确定");
  915. } else if (res.cancel) {
  916. console.log("用户点击取消");
  917. }
  918. },
  919. });
  920. return;
  921. }
  922. this.models1.disjunctor = false;
  923. let postData = {
  924. gdId: this.infoDATA.id,
  925. inspectId: this.currentInspect.id,
  926. reason: value == 1 ? 'checkDone' : 'modificationTime',
  927. yyTime: value == 1 ? undefined : yyTime,
  928. };
  929. uni.showLoading({
  930. title: '移除中',
  931. mask: true,
  932. })
  933. post('/workerOrder/removeInspectByOderId', postData).then(res => {
  934. uni.hideLoading();
  935. if (res.state == 200) {
  936. uni.showToast({
  937. icon: 'none',
  938. title: '移除成功!',
  939. success() {
  940. setTimeout(() => {
  941. uni.navigateTo({
  942. url: '../receiptpage/receiptpage',
  943. });
  944. }, 1500)
  945. }
  946. })
  947. } else {
  948. uni.showToast({
  949. icon: 'none',
  950. title: '移除失败!',
  951. })
  952. }
  953. })
  954. },
  955. // 移除检查->取消
  956. cancel1() {
  957. this.models1.disjunctor = false;
  958. },
  959. // 移除
  960. remove(item) {
  961. this.currentInspect = item;
  962. this.models1 = {
  963. disjunctor: true,
  964. content: "请选择您移除检查的原因?检查移除后将会自动完成或删除工单!",
  965. icon: "warn",
  966. operate: {
  967. ok: "确定",
  968. cancel: "取消",
  969. },
  970. };
  971. },
  972. // 拍照
  973. photograph(data) {
  974. photographTool(data);
  975. },
  976. // 特殊情况输入文字
  977. textareaInput(value) {
  978. this.textareaText = value;
  979. if (value.trim().length >= 10) {
  980. this.models.operate = {
  981. ok: "确定",
  982. cancel: "取消",
  983. };
  984. } else {
  985. this.models.operate = {
  986. cancel: "取消",
  987. };
  988. }
  989. },
  990. // 追加陪检人员按钮
  991. additionalUser(data) {
  992. if (!this.SMFlag) {
  993. return;
  994. }
  995. this.SMFlag = false;
  996. console.log(data, 'data');
  997. SM().then((ress1) => {
  998. uni.showLoading({
  999. title: "加载中",
  1000. mask: true,
  1001. });
  1002. //检验二维码的有效性
  1003. post("/dept/scanning", {
  1004. content: ress1,
  1005. taskTypeId: data.taskType.id,
  1006. gdState: data.gdState.id,
  1007. }).then((result) => {
  1008. this.SMFlag = true;
  1009. // this.currentCode = result.code;
  1010. if (result.state == 200 || result.state == 201) {
  1011. uni.hideLoading();
  1012. console.log(result);
  1013. let user = {};
  1014. try{
  1015. user = JSON.parse(result.code);
  1016. console.log(user);
  1017. }catch(e){
  1018. uni.showToast({
  1019. icon: "none",
  1020. title: "请扫描正确的二维码!",
  1021. });
  1022. }
  1023. if(user.type == 'myQrCode' && user.id && user.name){
  1024. uni.showModal({
  1025. title: "提示",
  1026. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1027. success: (res) => {
  1028. if (res.confirm) {
  1029. console.log("用户点击确定");
  1030. this.additionalUserCommon(user.id, data.id, data.worker.id);
  1031. } else if (res.cancel) {
  1032. console.log("用户点击取消");
  1033. }
  1034. },
  1035. });
  1036. }else{
  1037. uni.showToast({
  1038. icon: "none",
  1039. title: "请扫描正确的二维码!",
  1040. });
  1041. }
  1042. } else {
  1043. uni.hideLoading();
  1044. uni.showToast({
  1045. icon: "none",
  1046. title: "请求失败!",
  1047. });
  1048. }
  1049. });
  1050. }).catch(err=>{
  1051. this.SMFlag = true;
  1052. });
  1053. },
  1054. // 追加陪检人
  1055. additionalUserCommon(userId, gdId, workerId) {
  1056. console.log(userId, gdId, workerId);
  1057. uni.showLoading({
  1058. title: "加载中",
  1059. mask: true,
  1060. });
  1061. post("/workerOrder/additionalAccompanyingPersonnel", {
  1062. userId,
  1063. gdId,
  1064. workerId,
  1065. }).then((result) => {
  1066. uni.hideLoading();
  1067. if (result.state == 200) {
  1068. this.getInfo(this.dataId);
  1069. uni.showToast({
  1070. icon: 'none',
  1071. duration: 4000,
  1072. title: '操作成功!'
  1073. })
  1074. } else {
  1075. uni.showToast({
  1076. icon: 'none',
  1077. duration: 4000,
  1078. title: result.msg || '操作失败!'
  1079. })
  1080. }
  1081. });
  1082. },
  1083. // 特殊情况关闭按钮
  1084. specialCloseClick() {
  1085. this.textareaFlag = true;
  1086. this.models = {
  1087. title: "特殊情况关闭",
  1088. disjunctor: true,
  1089. content: "",
  1090. icon: "",
  1091. operate: {
  1092. cancel: "取消",
  1093. },
  1094. };
  1095. },
  1096. ok() {
  1097. uni.showLoading({
  1098. title: "加载中",
  1099. mask: true,
  1100. });
  1101. post("/workerOrder/specialCaseClose", {
  1102. workOrderId: this.dataId,
  1103. reason: this.textareaText.trim(),
  1104. }).then((result) => {
  1105. this.models.disjunctor = false;
  1106. this.textareaFlag = false;
  1107. this.textareaText = "";
  1108. if (result.state == 200) {
  1109. uni.hideLoading();
  1110. this.models = {
  1111. disjunctor: true,
  1112. content: "工单关闭成功",
  1113. icon: "success",
  1114. operate: {
  1115. know: "知道了",
  1116. },
  1117. };
  1118. } else {
  1119. uni.hideLoading();
  1120. this.models = {
  1121. disjunctor: true,
  1122. content: "工单关闭失败",
  1123. icon: "error",
  1124. operate: {
  1125. know: "知道了",
  1126. },
  1127. };
  1128. }
  1129. });
  1130. },
  1131. cancel() {
  1132. this.models.disjunctor = false;
  1133. this.textareaFlag = false;
  1134. this.textareaText = "";
  1135. },
  1136. // 点击可查看检查详情
  1137. show(type) {
  1138. this.showType = type;
  1139. if (type === "show") {
  1140. //展开
  1141. // 计算高度
  1142. const query = uni.createSelectorQuery().in(this);
  1143. query
  1144. .selectAll(".page_item_infos")
  1145. .boundingClientRect((data) => {
  1146. let len = data.reduce((prev, current) => {
  1147. return prev + current.height;
  1148. }, 0);
  1149. this.animation.height(len).step();
  1150. this.animationData = this.animation.export();
  1151. })
  1152. .exec();
  1153. } else if (type === "hiddle") {
  1154. this.animation.height(0).step();
  1155. this.animationData = this.animation.export();
  1156. }
  1157. },
  1158. // 抢单->知道了
  1159. know() {
  1160. this.models.disjunctor = false;
  1161. uni.navigateTo({
  1162. url: "../receiptpage/receiptpage",
  1163. });
  1164. },
  1165. // 抢单
  1166. showAlert() {
  1167. get("/workerOrder/takeOrder/" + this.infoDATA.id).then((res) => {
  1168. if (res.status == 200) {
  1169. this.models = {
  1170. disjunctor: true,
  1171. content: "接单成功",
  1172. icon: "success",
  1173. operate: {
  1174. know: "知道了",
  1175. },
  1176. };
  1177. } else {
  1178. uni.showToast({
  1179. icon: "none",
  1180. title: "请求失败!",
  1181. });
  1182. }
  1183. });
  1184. },
  1185. // 请求详细页面的数据(除标本轮巡和标本配送)
  1186. getInfo(id) {
  1187. uni.showLoading({
  1188. title: "加载中",
  1189. mask: true,
  1190. });
  1191. get("/api/fetchData/workOrder/" + id).then((res) => {
  1192. uni.hideLoading();
  1193. if (res.status == 200) {
  1194. this.infoDATA = res.data;
  1195. // 计算高度
  1196. setTimeout(() => {
  1197. const query = uni.createSelectorQuery().in(this);
  1198. query
  1199. .selectAll(".page_item_infos")
  1200. .boundingClientRect((data) => {
  1201. let len = data.reduce((prev, current) => {
  1202. return prev + current.height;
  1203. }, 0);
  1204. this.animation.height(len).step();
  1205. this.animationData = this.animation.export();
  1206. })
  1207. .exec();
  1208. }, 500)
  1209. } else {
  1210. uni.showToast({
  1211. icon: "none",
  1212. title: "请求失败!",
  1213. });
  1214. }
  1215. });
  1216. },
  1217. // 请求详细页面的数据
  1218. getInfoBySpecimen(id) {
  1219. uni.showLoading({
  1220. title: "加载中",
  1221. mask: true,
  1222. });
  1223. post("/api/getWechatItem", {
  1224. id
  1225. }).then((res) => {
  1226. uni.hideLoading();
  1227. if (res.state == 200) {
  1228. this.actualDelivery = res.actualDelivery;
  1229. this.infoDATA = res.data;
  1230. // 计算高度
  1231. setTimeout(() => {
  1232. const query = uni.createSelectorQuery().in(this);
  1233. query
  1234. .selectAll(".page_item_infos")
  1235. .boundingClientRect((data) => {
  1236. let len = data.reduce((prev, current) => {
  1237. return prev + current.height;
  1238. }, 0);
  1239. this.animation.height(len).step();
  1240. this.animationData = this.animation.export();
  1241. })
  1242. .exec();
  1243. }, 500)
  1244. } else {
  1245. uni.showToast({
  1246. icon: "none",
  1247. title: "请求失败!",
  1248. });
  1249. }
  1250. });
  1251. },
  1252. // 获取检查页面控制开关
  1253. getTaskConfig(){
  1254. post("/simple/data/fetchDataList/taskTypeConfig", {
  1255. "idx": 0,
  1256. "sum": 10,
  1257. "taskTypeConfig": {
  1258. "taskTypeDTO": {
  1259. "hosId": {
  1260. "id": this.hosId
  1261. },
  1262. "associationType": {
  1263. "key": "association_types",
  1264. "value": "inspect"
  1265. }
  1266. }
  1267. }
  1268. }).then((result) => {
  1269. if (result.status == 200) {
  1270. if(result.list && result.list[0]){
  1271. this.multiplayerMode = result.list[0].multiplayerMode;
  1272. }else{
  1273. this.multiplayerMode = 0;
  1274. }
  1275. } else {
  1276. this.multiplayerMode = 0;
  1277. }
  1278. });
  1279. }
  1280. },
  1281. onLoad(options) {
  1282. console.log(options, 'options');
  1283. this.currentUserId = uni.getStorageSync('userData').user.id;
  1284. let id = options.id;
  1285. this.dataId = id;
  1286. if (
  1287. options.associationTypeValue == 'specimen' ||
  1288. options.associationTypeValue == 'specimenPlan'
  1289. ) {
  1290. this.getInfoBySpecimen(id);
  1291. } else {
  1292. this.getInfo(id);
  1293. }
  1294. if (
  1295. options.associationTypeValue == 'inspect' ||
  1296. options.associationTypeValue == 'patientTransport'
  1297. ) {
  1298. this.getTaskConfig();
  1299. }
  1300. // 创建动画
  1301. this.animation = uni.createAnimation({
  1302. duration: 500,
  1303. timingFunction: "ease",
  1304. });
  1305. // #ifdef APP-PLUS
  1306. webHandle("no", "app");
  1307. // #endif
  1308. // #ifdef H5
  1309. webHandle("no", "wx");
  1310. // #endif
  1311. },
  1312. onUnload() {
  1313. // 页面关闭后清空数据
  1314. this.animationData = {};
  1315. },
  1316. };
  1317. </script>
  1318. <style lang="less">
  1319. .Receipt_infopage {
  1320. padding: 0 20rpx;
  1321. overflow: hidden;
  1322. .red {
  1323. color: red !important;
  1324. font-weight: bold !important;
  1325. }
  1326. .green {
  1327. color: #49b856 !important;
  1328. font-weight: bold !important;
  1329. }
  1330. .title {
  1331. font-size: 48rpx;
  1332. margin-top: 24rpx;
  1333. margin-bottom: 24rpx;
  1334. text-align: center;
  1335. }
  1336. .page_item {
  1337. margin-top: 16rpx;
  1338. margin-bottom: 124rpx;
  1339. background: #fff;
  1340. border-radius: 8rpx;
  1341. padding: 0 16rpx;
  1342. border: 2rpx solid #e5e9ed;
  1343. .L {
  1344. width: 40rpx;
  1345. height: 40rpx;
  1346. border-radius: 50%;
  1347. background: #f9fafb;
  1348. position: relative;
  1349. left: -50rpx;
  1350. top: 66rpx;
  1351. }
  1352. .R {
  1353. width: 40rpx;
  1354. height: 40rpx;
  1355. border-radius: 50%;
  1356. background: #f9fafb;
  1357. position: relative;
  1358. float: right;
  1359. right: -50rpx;
  1360. top: 26rpx;
  1361. }
  1362. .starting {
  1363. width: 50rpx;
  1364. height: 50rpx;
  1365. color: #fff;
  1366. background: #49b856;
  1367. display: inline-block;
  1368. border-radius: 50%;
  1369. text-align: center;
  1370. line-height: 46rpx;
  1371. font-size: 32rpx;
  1372. margin-right: 6rpx;
  1373. }
  1374. .End {
  1375. width: 50rpx;
  1376. height: 50rpx;
  1377. color: #fff;
  1378. background: #39b199;
  1379. display: inline-block;
  1380. border-radius: 50%;
  1381. text-align: center;
  1382. line-height: 46rpx;
  1383. font-size: 32rpx;
  1384. margin-right: 6rpx;
  1385. }
  1386. .page_item_top {
  1387. height: 86rpx;
  1388. border-bottom: 2rpx dashed #666;
  1389. padding: 0 16rpx;
  1390. .page_item_top_L {
  1391. height: 100%;
  1392. float: left;
  1393. line-height: 88rpx;
  1394. .emergencys {
  1395. background: #ff3b53 !important;
  1396. width: 124rpx !important;
  1397. }
  1398. .emergency {
  1399. background: #ff3b53 !important;
  1400. }
  1401. .emergency1 {
  1402. background: #49b856 !important;
  1403. }
  1404. .page_item_cont_start {
  1405. text-align: center;
  1406. height: 44rpx;
  1407. width: 104rpx;
  1408. line-height: 44rpx;
  1409. border-radius: 8rpx;
  1410. background: #49b856;
  1411. color: #fff;
  1412. display: inline-block;
  1413. font-size: 28rpx;
  1414. .cubeic-star {
  1415. margin-right: 8rpx;
  1416. }
  1417. }
  1418. .L_time {
  1419. color: #6cc076;
  1420. font-size: 32rpx;
  1421. }
  1422. .L_text {
  1423. font-size: 32rpx;
  1424. display: inline-block;
  1425. font-weight: 700;
  1426. margin-right: 16rpx;
  1427. }
  1428. }
  1429. .page_item_top_R {
  1430. height: 60rpx;
  1431. float: right;
  1432. padding-top: 20rpx;
  1433. font-size: 32rpx;
  1434. position: absolute;
  1435. right: 50rpx;
  1436. .L_iocn {
  1437. display: inline-block;
  1438. height: 52rpx;
  1439. line-height: 48rpx;
  1440. color: rgb(7, 134, 60);
  1441. font-size: 36rpx;
  1442. font-weight: 700;
  1443. }
  1444. }
  1445. }
  1446. .page_item_cont {
  1447. min-height: 180rpx;
  1448. // max-height: 424rpx;
  1449. padding: 0 16rpx;
  1450. text-align: left;
  1451. position: relative;
  1452. .text_big {
  1453. font-size: 32rpx;
  1454. position: absolute;
  1455. right: 16rpx;
  1456. font-weight: 700;
  1457. margin-top: 10rpx;
  1458. }
  1459. .text_big2 {
  1460. font-size: 32rpx;
  1461. position: absolute;
  1462. right: 16rpx;
  1463. font-weight: 700;
  1464. }
  1465. .line {
  1466. height: 20rpx;
  1467. width: 2rpx;
  1468. border-left: 2rpx solid #666;
  1469. position: absolute;
  1470. top: 82rpx;
  1471. left: 40rpx;
  1472. }
  1473. .lines {
  1474. height: 40%;
  1475. width: 2rpx;
  1476. border-left: 2rpx solid #666;
  1477. position: absolute;
  1478. top: 23%;
  1479. left: 36rpx;
  1480. }
  1481. .page_item_cont_T {
  1482. padding-top: 28rpx;
  1483. font-size: 28rpx;
  1484. .page_item_cont_title {
  1485. height: 100%;
  1486. font-size: 32rpx;
  1487. }
  1488. }
  1489. .page_item_cont_B {
  1490. padding-top: 28rpx;
  1491. margin-bottom: 28rpx;
  1492. .page_item_cont_title {
  1493. height: 60rpx;
  1494. font-size: 32rpx;
  1495. }
  1496. .page_item_cont_title1 {
  1497. height: 60rpx;
  1498. line-height: 60rpx;
  1499. font-size: 32rpx;
  1500. padding-left: 64rpx;
  1501. }
  1502. }
  1503. }
  1504. .page_item_foot {
  1505. border-top: 2rpx dashed #666;
  1506. border-bottom: 2rpx dashed #666;
  1507. padding: 28rpx 16rpx;
  1508. text-align: left;
  1509. .page_item_foot_text {
  1510. font-size: 32rpx;
  1511. margin-bottom: 20rpx;
  1512. .text1 {
  1513. color: rgb(102, 102, 102);
  1514. }
  1515. .text2 {
  1516. float: right;
  1517. font-weight: 700;
  1518. }
  1519. }
  1520. }
  1521. .page_item_info {
  1522. padding: 20rpx 16rpx;
  1523. text-align: left;
  1524. line-height: 60rpx;
  1525. font-size: 32rpx;
  1526. .spe_list {
  1527. padding: 32rpx 0;
  1528. border-top: 2rpx solid #666;
  1529. .page_item_info_title {
  1530. color: #666;
  1531. }
  1532. }
  1533. .page_item_info_title {
  1534. font-weight: 700;
  1535. }
  1536. .text {
  1537. float: right;
  1538. font-weight: 700;
  1539. .page_item_info_txt {
  1540. color: #49b856;
  1541. margin-left: 8rpx;
  1542. margin-right: 8rpx;
  1543. }
  1544. }
  1545. }
  1546. #infos {
  1547. height: 0;
  1548. overflow: hidden;
  1549. }
  1550. .page_item_infos {
  1551. padding-top: 20rpx;
  1552. padding-bottom: 20rpx;
  1553. border-bottom: 2rpx dashed #666;
  1554. .page_item_info2 {
  1555. text-align: left;
  1556. line-height: 60rpx;
  1557. font-size: 32rpx;
  1558. padding-left: 16rpx;
  1559. .page_item_foot_text {
  1560. font-size: 32rpx;
  1561. margin-bottom: 20rpx;
  1562. &:last-of-type {
  1563. margin-bottom: 0;
  1564. }
  1565. .text1 {
  1566. color: rgb(102, 102, 102);
  1567. }
  1568. .text2 {
  1569. float: right;
  1570. font-weight: 700;
  1571. }
  1572. .btn {
  1573. height: 66rpx;
  1574. width: 132rpx;
  1575. margin: 0 auto;
  1576. background-color: #49b856;
  1577. color: #fff;
  1578. border-radius: 8rpx;
  1579. font-size: 32rpx;
  1580. margin-top: 20rpx;
  1581. text-align: center;
  1582. }
  1583. }
  1584. }
  1585. }
  1586. #pulldown {
  1587. color: #49b856;
  1588. font-size: 36rpx;
  1589. height: 60rpx;
  1590. text-align: center;
  1591. .cubeic-pulldown {
  1592. font-size: 48rpx;
  1593. position: relative;
  1594. bottom: 6rpx;
  1595. }
  1596. }
  1597. #pullup {
  1598. color: #49b856;
  1599. font-size: 36rpx;
  1600. height: 60rpx;
  1601. text-align: center;
  1602. .cubeic-pullup {
  1603. font-size: 48rpx;
  1604. position: relative;
  1605. top: 12rpx;
  1606. }
  1607. }
  1608. }
  1609. .foot_btn2 {
  1610. position: fixed;
  1611. bottom: 0;
  1612. right: 20rpx;
  1613. left: 20rpx;
  1614. line-height: 66rpx;
  1615. height: 100rpx;
  1616. border-top: 2rpx solid #e5e9ed;
  1617. background: #f9fafb;
  1618. display: flex;
  1619. justify-content: space-between;
  1620. .btn2,
  1621. .btn3 {
  1622. height: 66rpx;
  1623. flex: 1;
  1624. margin: 0 1%;
  1625. background-image: linear-gradient(to right, #72c172, #3bb197);
  1626. color: #fff;
  1627. border-radius: 8rpx;
  1628. font-size: 28rpx;
  1629. margin-top: 16rpx;
  1630. text-align: center;
  1631. }
  1632. }
  1633. }
  1634. </style>