receipt_infopage.vue 85 KB

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