receipt_infopage.vue 62 KB

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