receipt_infopage.vue 62 KB

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