scanning_Result.vue 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  1. <template>
  2. <view class="Scanning_Result">
  3. <view class="Scanning_top" v-if="res.status == 200">
  4. <view class="Scanning_top_icon">
  5. <view v-if="type == 'specimenPlan' || type == 'specimen'">
  6. <view class="red fweight speNum"> {{ speNum }} </view>
  7. </view>
  8. <text v-else class="cubeic-ok newicon newicon-duigou"></text>
  9. </view>
  10. <view class="Scanning_top_text">
  11. <view class="text1"> 操作成功 </view>
  12. <view class="success_tips" v-if="type == 'inspect' || type == 'patientTransport'">
  13. (请您评估患者的意识状况、生命体征、配合程度,如有异常请及时联系护士!)
  14. </view>
  15. </view>
  16. </view>
  17. <view class="Scanning_top" v-if="res.status == 11111">
  18. <view class="Scanning_top_icon">
  19. <text class="cubeic-close newicon newicon-shibai"></text>
  20. </view>
  21. <view class="Scanning_top_text">
  22. <view class="text1" style="color: red;">操作失败</view>
  23. </view>
  24. </view>
  25. <view class="Scanning_top" v-if="(res.status != 200 && res.status != 11111)">
  26. <view class="Scanning_top_icon">
  27. <text class="cubeic-close newicon newicon-shibai"></text>
  28. </view>
  29. <view class="Scanning_top_text">
  30. <view class="text1"> 操作失败 </view>
  31. <view class="text1 f30" v-if="queryObj.qrcode !== undefined"> 扫描内容:{{queryObj.qrcode}} </view>
  32. </view>
  33. </view>
  34. <view class="Scanning_cont spe" v-if="
  35. (res.status == 200 && type == 'specimenPlan') ||
  36. (res.status == 200 && type == 'specimen')
  37. ">
  38. <view class="df">
  39. <view class="width-100">编 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 码:</view>
  40. <view>
  41. <text class="red">{{infoDATA.urgent==1?'急':''}}</text>
  42. <text class="mar-le">{{infoDATA.scode}} </text>
  43. </view>
  44. <view class="po-ab">{{infoDATA.speState && infoDATA.speState.name}}</view>
  45. </view>
  46. <view class="df"><view class="width-100">检验项目:</view> {{ infoDATA.specimenDesc || "-" }}</view>
  47. <view class="df"><view class="width-100">类 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 型:</view>{{ infoDATA.stype.name }} <text v-if="infoDATA.tubeType">、</text> {{infoDATA.tubeType && infoDATA.tubeType.name}}</view>
  48. <view class="df">
  49. <view class="width-100">科 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 室:</view>
  50. {{ infoDATA.sickRoom ? infoDATA.sickRoom.dept : "" }}
  51. <text class="newicon newicon-arrow-right-full"></text>
  52. <text :class="{ red: isEndDeptRedShow }">{{ infoDATA.checkDept ? infoDATA.checkDept.dept : "" }}</text>
  53. </view>
  54. <view class="df"><view class="width-100">患者姓名:</view>{{ infoDATA.patientName}}({{infoDATA.bedNum}})</view>
  55. <view class="df" v-if="infoDATA.residenceNo"><view class="width-100">住院号:</view>{{ infoDATA.residenceNo }}</view>
  56. <view class="df" v-else-if="infoDATA.patientNo"><view class="width-100">门诊号:</view>{{ infoDATA.patientNo }}</view>
  57. </view>
  58. <view class="Scanning_cont spe" v-if="
  59. (res.status == 11111 && type == 'specimenPlan') ||
  60. (res.status == 11111 && type == 'specimen')
  61. ">
  62. <view class="df"><view class="width-100">编码:</view> <text class="red">{{infoDATA.urgent==1?'急':''}}</text> {{infoDATA.scode}} {{infoDATA.speState && infoDATA.speState.name}}</view>
  63. <view class="df"><view class="width-100">检验项目:</view> {{ infoDATA.specimenDesc || "-" }}</view>
  64. <view class="df"><view class="width-100">类型:</view>{{ infoDATA.stype.name }} <text v-if="infoDATA.tubeType">、</text> {{infoDATA.tubeType && infoDATA.tubeType.name}}</view>
  65. <view class="df">
  66. <view class="width-100">科室:</view>
  67. {{ infoDATA.sickRoom ? infoDATA.sickRoom.dept : "" }}
  68. <text class="newicon newicon-arrow-right-full"></text>
  69. <text :class="{ red: isEndDeptRedShow }">{{ infoDATA.checkDept ? infoDATA.checkDept.dept : "" }}</text>
  70. </view>
  71. <view class="df"><view class="width-100">患者姓名:</view>{{ infoDATA.patientName}}({{infoDATA.bedNum}})</view>
  72. <view class="df" v-if="infoDATA.residenceNo"><view class="width-100">住院号:</view>{{ infoDATA.residenceNo }}</view>
  73. <view class="df" v-else-if="infoDATA.patientNo"><view class="width-100">门诊号:</view>{{ infoDATA.patientNo }}</view>
  74. </view>
  75. <view class="Scanning_cont" v-if="
  76. (res.status == 200 && type == 'inspect') || type == 'patientTransport'
  77. ">
  78. <view class="df" v-if="res.patient"> <view class="width-100">患者姓名:</view> {{ res.patient || "-" }} </view>
  79. <view class="df" v-if="res.residenceNo">
  80. <view class="width-100">住院号:</view> {{ res.residenceNo || "-" }}
  81. </view>
  82. <view class="df" v-if="res.deptName">
  83. <view class="width-100">住院科室:</view> {{ res.deptName !== "undefined" ? res.deptName : "-" }}
  84. </view>
  85. <view class="df" v-if="res.bedNum">
  86. <view class="width-100">床号:</view> {{ res.bedNum !== "undefined" ? res.bedNum : "-" }}
  87. </view>
  88. <view class="df" v-if="res.data">
  89. <view class="width-100">检查项目:</view>
  90. <text v-for="(data, i) in res.data" :key="i">{{
  91. data.inspectName
  92. }}</text>
  93. </view>
  94. <view v-if="
  95. res.status == 200 &&
  96. infoType != 'ins-zxz-1' &&
  97. infoType != 'ins-dsd-1' &&
  98. infoType != 'ins-ddd-1' &&
  99. infoType != 'trans-ddd-1' &&
  100. infoType != 'trans-dsd-1'
  101. ">
  102. {{ res.msg || "" }}
  103. </view>
  104. <view v-if="infoType == 'trans-dsd-1' && res.status == 200">
  105. 工单已完成
  106. </view>
  107. <view v-if="infoType == 'ins-dsd-1' && res.status == 200">
  108. 工单已完成。
  109. </view>
  110. <!-- 半程陪检 -->
  111. <view v-if="infoDATA.type == 'ins-half-ok' && res.status == 200">
  112. 已到达检查科室,工单已完成。
  113. </view>
  114. </view>
  115. <view class="Scanning_cont" v-if="res.status == 200 && (type == 'drugsBag' || type == 'jPBag')">
  116. <view class="df"> <view class="width-100">药包类型:</view> {{(infoDATA.packType && infoDATA.packType !== 0) ? DRUGSBAG_TYPE[infoDATA.packType] : "-"}} </view>
  117. <view class="df" v-if="type == 'drugsBag'"> <view class="width-100">药包编码:</view> #{{ infoDATA.packid }} </view>
  118. <view class="df"
  119. v-if="type == 'drugsBag' && accountObj && (queryObj.type1 === 'drug-ddd-2' || queryObj.type1 === 'drug-dsd-2')">
  120. <view class="width-100">交接人工号:</view> {{ accountObj.account }} </view>
  121. <view class="df"
  122. v-if="type == 'drugsBag' && accountObj && (queryObj.type1 === 'drug-ddd-2' || queryObj.type1 === 'drug-dsd-2')">
  123. <view class="width-100">交接人姓名:</view> {{ accountObj.accountName }} </view>
  124. <view class="df"v-if="type == 'jPBag'">
  125. <view class="width-100">静配药包编码:</view> #{{ infoDATA.packid }}
  126. </view>
  127. <view class="df"> <view class="width-100">所属科室:</view> {{ infoDATA.target.dept || "-" }} </view>
  128. <view v-if="infoType === 'drug-dsd-2' || infoType === 'jp-dsd-2'">
  129. 工单已完成。
  130. </view>
  131. <view class="red"> 如果您当前科室还有药包需要扫描,请点击“继续扫描”! </view>
  132. </view>
  133. <view class="Scanning_cont" v-if="res.status != 200">
  134. <view class="Scanning_cont_center" v-if="res.status != 11111">
  135. {{ res.msg === "undefined" || !res.msg ? "" : res.msg }}
  136. </view>
  137. </view>
  138. <view class="foot_btn_spe" v-if="
  139. (type == 'specimen' && isKs != '1') ||
  140. (type == 'specimenPlan' && isKs != '1')
  141. ">
  142. <view class="btn1" @click="Scanning_again()"> 继续扫描 </view>
  143. <view class="btn3" @click="hand_again()">手动录入</view>
  144. <view class="btn3" @click="getNoScanSpecimen(false)">未扫描标本</view>
  145. <view class="btn3" @click="getNoScanSpecimen(true)">已扫描标本</view>
  146. <view class="btn3" @click="Scanning_complete(dataId)"> 完成扫描 </view>
  147. <view class="btn3" v-if="speCollectLimit==1" @click="configuration(dataId)"> 配置收取 </view>
  148. </view>
  149. <view class="foot_btn" v-if="
  150. (type != 'specimenPlan' &&
  151. type != 'specimen' &&
  152. type != 'drugsBag' &&
  153. type != 'jPBag' &&
  154. (type != 'inspect') & (type != 'patientTransport')) ||
  155. (queryObj.status == 200 &&
  156. type == 'drugsBag' &&
  157. infoType == 'drug-ddd-2') ||
  158. (queryObj.status == 200 &&
  159. type == 'drugsBag' &&
  160. infoType == 'drug-dsd-2') ||
  161. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-ddd-2') ||
  162. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-dsd-2') ||
  163. (queryObj.status == 200 && type == 'inspect') ||
  164. (queryObj.status == 200 && type == 'patientTransport')
  165. ">
  166. <view class="btn3" @click="Scanning_again()" v-if="type == 'drugsBag'||type == 'jPBag'"> 继续扫描 </view>
  167. <view class="btn3" @click="showAlert(dataId)"> 返回 </view>
  168. </view>
  169. <view class="foot_btn" v-if="
  170. (isKs != '1' &&
  171. queryObj.status != 200 &&
  172. type == 'drugsBag' &&
  173. infoType == 'drug-ddd-2') ||
  174. (isKs != '1' &&
  175. queryObj.status != 200 &&
  176. type == 'drugsBag' &&
  177. infoType == 'drug-dsd-2') ||
  178. (isKs != '1' &&
  179. queryObj.status != 200 &&
  180. type == 'jPBag' &&
  181. infoType == 'jp-ddd-2') ||
  182. (isKs != '1' &&
  183. queryObj.status != 200 &&
  184. type == 'jPBag' &&
  185. infoType == 'jp-dsd-2') ||
  186. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  187. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  188. ">
  189. <view class="btn3" @click="Scanning_again()"> 继续扫描 </view>
  190. <view class="btn3" @click="showAlert()" v-if="type == 'drugsBag'"> 返回 </view>
  191. <view class="btn3" @click="photograph(queryObj, { DEPTCode, DEPT, infoType })" v-if="
  192. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  193. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  194. ">
  195. 拍照
  196. </view>
  197. </view>
  198. <view class="foot_btn" v-if="
  199. infoType == 'spe-ddd-1' ||
  200. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-2') ||
  201. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-1') ||
  202. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-ddd-2') ||
  203. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-3') ||
  204. (isKs == '1' &&
  205. queryObj.status != 200 &&
  206. infoType == 'plan-spe-ddd-1') ||
  207. (isKs == '1' &&
  208. queryObj.status != 200 &&
  209. infoType == 'plan-spe-ddd-2') ||
  210. (isKs == '1' &&
  211. queryObj.status != 200 &&
  212. infoType == 'plan-spe-dsd-1') ||
  213. (isKs == '1' &&
  214. queryObj.status != 200 &&
  215. infoType == 'plan-spe-dsd-2') ||
  216. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-2') ||
  217. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-2') ||
  218. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-2') ||
  219. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-2') ||
  220. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-1') ||
  221. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-1') ||
  222. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-1') ||
  223. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-1') ||
  224. (isKs == '1' &&
  225. queryObj.status != 200 &&
  226. infoType == 'plan-spe-dsd-3') ||
  227. (isKs == '1' &&
  228. queryObj.status != 200 &&
  229. type == 'inspect' &&
  230. queryObj.type1 === 'undefined') ||
  231. (isKs == '1' &&
  232. queryObj.status != 200 &&
  233. type == 'patientTransport' &&
  234. queryObj.type1 === 'undefined')
  235. ">
  236. <view class="btn3" @click="showAlert(dataId)"> 返回 </view>
  237. </view>
  238. <view class="foot_btn" v-if="
  239. (isKs == '1' &&
  240. queryObj.status != 200 &&
  241. type == 'inspect' &&
  242. queryObj.type1 === 'ins-zxz-1') ||
  243. (isKs == '1' &&
  244. queryObj.status != 200 &&
  245. type == 'inspect' &&
  246. queryObj.type1 === 'ins-dsd-1') ||
  247. (isKs == '1' &&
  248. queryObj.status != 200 &&
  249. type == 'patientTransport' &&
  250. queryObj.type1 === 'trans-dsd-1')
  251. ">
  252. <view class="btn1" @click="showAlert(dataId)"> 返回 </view>
  253. <view class="btn2" @click="goToRight(dataId)"> 继续执行工单 </view>
  254. </view>
  255. <!-- 弹窗 -->
  256. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  257. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  258. <!-- 弹窗 -->
  259. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  260. :radioItem="models1.radioItem" @ok="ok1" @radioChange="radioChange1" @cancel="cancel1" :operate="models1.operate">
  261. </showModel>
  262. <!-- 弹窗 -->
  263. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  264. @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate">
  265. </showModel>
  266. <!-- 手动查询标本弹窗 -->
  267. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  268. @ok="speOk" @cancel="speCancel">
  269. </handViewSpecimen>
  270. <!-- 调查问卷二维码 -->
  271. <questionCode v-if="isQuestionModel" :orderId="dataId" @know="isQuestionModel = false"></questionCode>
  272. <!-- PDA扫描 -->
  273. <scanner></scanner>
  274. <!-- 标本扫描拦截 -->
  275. <!-- <errorModel v-show="errorModal" ref="model11" :errorModal="errorModal" :speDATA="speDATA" @cancel="cancelError" @confirm="confirmError($event)"></errorModel> -->
  276. </view>
  277. </template>
  278. <script>
  279. import scanner from "../../components/scanner/scanner.vue";
  280. import showModel from "../../components/showModel/showModel.vue";
  281. import errorModel from "../../components/errorModel/errorModel.vue";
  282. import questionCode from "../../components/questionCode/questionCode.vue";
  283. import {
  284. get,
  285. post,
  286. SM,
  287. webHandle
  288. } from "../../http/http.js";
  289. import {
  290. photographTool
  291. } from "../../tools/photograph.js";
  292. import {
  293. DRUGSBAG_TYPE
  294. } from '../../tools/enum.drugsbagType.js';
  295. export default {
  296. components:{
  297. questionCode,
  298. scanner,
  299. errorModel
  300. },
  301. data() {
  302. return {
  303. // 终点科室标红
  304. isEndDeptRedShow: false,
  305. isEndDeptRed: false,
  306. // 调研二维码
  307. isQuestionModel:false,
  308. DRUGSBAG_TYPE,
  309. currentCode: '', //当前小扫描的科室二维码
  310. // 手动查询标本弹窗model
  311. speModels: {
  312. disjunctor: false,
  313. },
  314. deptId: undefined,
  315. handover: undefined,
  316. SMFlag: true,
  317. // 交接人信息
  318. accountObj: undefined,
  319. // 完成扫描的id
  320. wcId: "",
  321. wcFlag: false,
  322. // 弹窗model
  323. models: {
  324. disjunctor: false,
  325. },
  326. // 单选框弹窗model1
  327. models1: {
  328. disjunctor: false,
  329. },
  330. // 完成扫描弹窗model1
  331. models2: {
  332. disjunctor: false,
  333. },
  334. isKs: "", //是否科室签到 1
  335. infoDATA: {},
  336. res: {},
  337. infoType: "",
  338. DEPTCode: "",
  339. RESData: {},
  340. DEPT: "",
  341. dataId: "",
  342. type: "",
  343. model: {},
  344. speNum: 0,
  345. queryObj: {}, //路由传递过来的数据
  346. selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
  347. gotoFlag: true,
  348. content: "",
  349. taskTypeId:"",
  350. speCollectLimit:null,
  351. errorModal:null,
  352. speDATA:null,
  353. interceptData:null,
  354. intercept:null,
  355. num: 0,
  356. isShow:null
  357. };
  358. },
  359. methods: {
  360. // 手动查询标本-确认
  361. speOk(data) {
  362. console.log(data);
  363. if (!data.id) {
  364. //没有查询到标本
  365. uni.showModal({
  366. title: '提示',
  367. content: "没有查询到标本!",
  368. showCancel: false,
  369. success: function(res) {
  370. if (res.confirm) {
  371. console.log('用户点击确定');
  372. } else if (res.cancel) {
  373. console.log('用户点击取消');
  374. }
  375. }
  376. });
  377. return;
  378. }
  379. this.speModels.disjunctor = false;
  380. this.hand_scanning_common(data.scode, 'hand');
  381. },
  382. // 手动查询标本-取消
  383. speCancel() {
  384. this.speModels.disjunctor = false;
  385. },
  386. // 手动查询标本弹窗
  387. showHandViewSpecimen() {
  388. this.speModels = {
  389. title: '填写标本编码',
  390. disjunctor: true,
  391. }
  392. },
  393. // 手动录入标本
  394. hand_again() {
  395. this.showHandViewSpecimen();
  396. },
  397. // 手动输入标本和扫码公共方法
  398. hand_scanning_common(ress1, type) {
  399. // ----------------
  400. uni.showLoading({
  401. title: "加载中",
  402. mask: true,
  403. });
  404. //检验二维码的有效性
  405. post("/dept/scanning", {
  406. content: ress1,
  407. }).then((result) => {
  408. this.SMFlag = true;
  409. this.currentCode = result.code;
  410. if (result.state == 200 || result.state == 201) {
  411. let codes = result.code;
  412. if (codes) {
  413. let speCode = codes;
  414. let data = {
  415. code: speCode,
  416. type: this.queryObj.type1,
  417. deptCode: this.DEPTCode,
  418. ids: [],
  419. speVerifyType:null,
  420. addConfig:null
  421. };
  422. if(this.speDATA){
  423. data.speVerifyType = this.speDATA.speVerifyType
  424. }else{
  425. delete data.speVerifyType
  426. }
  427. if(this.interceptData && this.interceptData.addConfig){
  428. data.addConfig = 1
  429. }else{
  430. delete data.addConfig
  431. }
  432. data.ids.push(this.dataId);
  433. let postType = "";
  434. if (this.type == "jPBag" || this.type == "drugsBag") {
  435. postType = "handleDrugsAndJp";
  436. if(this.type == "drugsBag"){
  437. delete data.ids;
  438. }
  439. data.deptId = this.deptId;
  440. data.handover = this.handover;
  441. }
  442. if (this.type == "specimen") {
  443. data["speCode"] = data.code;
  444. delete data.code;
  445. postType = "handleSpes";
  446. }
  447. if (this.type == "specimenPlan") {
  448. data["speCode"] = data.code;
  449. delete data.code;
  450. postType = "handlePlanSpes";
  451. }
  452. if (this.type == "inspect") {
  453. postType = "handleIns";
  454. }
  455. if (this.type == "patientTransport") {
  456. postType = "handleTrans";
  457. }
  458. post("/workerOrder/" + postType, data).then((ress) => {
  459. uni.hideLoading();
  460. this.speDATA = null
  461. this.interceptData = null
  462. if (ress.status == 200 || ress.status == 11111) {
  463. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  464. if ((this.type == "specimenPlan" || this.type == "specimen") && ress.status != 11111) {
  465. this.getPageConfigSpecimen((flag, type, ress) => {
  466. // if(flag && !this.isShow){
  467. setTimeout(()=>{
  468. if (type === 'scan') {
  469. // #ifdef H5
  470. this.Scanning_again();
  471. // #endif
  472. }
  473. },500)
  474. // }
  475. if(ress){
  476. this.infoDATA = ress.data;
  477. this.speNum = ress.specimenCount;
  478. // 标本拦截收取参数
  479. let sessData = `type=${
  480. this.queryObj.type
  481. }&type1=${
  482. this.queryObj.type1
  483. }&infoData=${encodeURIComponent(
  484. JSON.stringify(ress.data)
  485. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  486. this.queryObj.deptCode
  487. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}&isEndDeptRed=${this.isEndDeptRed}`
  488. uni.setStorageSync('gdData', JSON.stringify(sessData))
  489. uni.redirectTo({
  490. url: `../scanning_Result/scanning_Result?type=${
  491. this.queryObj.type
  492. }&type1=${
  493. this.queryObj.type1
  494. }&infoData=${encodeURIComponent(
  495. JSON.stringify(ress.data)
  496. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  497. this.queryObj.deptCode
  498. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}&isEndDeptRed=${this.isEndDeptRed}`,
  499. });
  500. }
  501. }, type, ress.data, ress);
  502. return;
  503. }
  504. if (this.type == "specimenPlan" || this.type == "specimen") {
  505. this.infoDATA = ress.data;
  506. this.speNum = ress.specimenCount;
  507. uni.redirectTo({
  508. url: `../scanning_Result/scanning_Result?type=${
  509. this.queryObj.type
  510. }&type1=${
  511. this.queryObj.type1
  512. }&infoData=${encodeURIComponent(
  513. JSON.stringify(ress.data)
  514. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  515. this.queryObj.deptCode
  516. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}`,
  517. });
  518. } else if (
  519. this.type == "inspect" ||
  520. this.type == "patientTransport"
  521. ) {
  522. if(this.type == "patientTransport" && this.queryObj.type1 == 'trans-ddd-1'){
  523. // 门诊服务点,有orderList
  524. if(ress.orderList){
  525. uni.navigateTo({
  526. url: `/pages/outpatient/outpatientStartSignIn/outpatientStartSignIn?model=${encodeURIComponent(JSON.stringify(ress))}`,
  527. });
  528. }else{
  529. uni.redirectTo({
  530. url: `../scanning_Result/scanning_Result?type=${
  531. this.queryObj.type
  532. }&type1=${
  533. this.queryObj.type1
  534. }&infoData=${encodeURIComponent(
  535. JSON.stringify(ress.data)
  536. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  537. this.queryObj.deptCode
  538. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  539. JSON.stringify(ress)
  540. )}&patient=${ress.patient}&patientCode=${
  541. ress.patientCode
  542. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  543. });
  544. }
  545. }else if(this.type == "patientTransport" && this.queryObj.type1 == 'trans-dsd-1'){
  546. // 门诊服务点,有orderList
  547. if(ress.orderList){
  548. uni.navigateTo({
  549. url: `/pages/outpatient/outpatientEndSignIn/outpatientEndSignIn?model=${encodeURIComponent(JSON.stringify(ress))}`,
  550. });
  551. }else{
  552. uni.redirectTo({
  553. url: `../scanning_Result/scanning_Result?type=${
  554. this.queryObj.type
  555. }&type1=${
  556. this.queryObj.type1
  557. }&infoData=${encodeURIComponent(
  558. JSON.stringify(ress.data)
  559. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  560. this.queryObj.deptCode
  561. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  562. JSON.stringify(ress)
  563. )}&patient=${ress.patient}&patientCode=${
  564. ress.patientCode
  565. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  566. });
  567. }
  568. }else{
  569. uni.redirectTo({
  570. url: `../scanning_Result/scanning_Result?type=${
  571. this.queryObj.type
  572. }&type1=${
  573. this.queryObj.type1
  574. }&infoData=${encodeURIComponent(
  575. JSON.stringify(ress.data)
  576. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  577. this.queryObj.deptCode
  578. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  579. JSON.stringify(ress)
  580. )}&patient=${ress.patient}&patientCode=${
  581. ress.patientCode
  582. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  583. });
  584. }
  585. } else {
  586. uni.redirectTo({
  587. url: `../scanning_Result/scanning_Result?type=${
  588. this.queryObj.type
  589. }&type1=${
  590. this.queryObj.type1
  591. }&infoData=${encodeURIComponent(
  592. JSON.stringify(ress.data)
  593. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  594. this.queryObj.deptCode
  595. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  596. });
  597. }
  598. } else if (ress.status==513){
  599. uni.navigateTo({
  600. url: `../speError/speError?type=${
  601. this.queryObj.type
  602. }&type1=${
  603. this.queryObj.type1
  604. }&infoData=${encodeURIComponent(
  605. JSON.stringify(ress.data)
  606. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  607. this.queryObj.deptCode
  608. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}&isEndDeptRed=${this.isEndDeptRed}`,
  609. });
  610. } else if(ress.status==10004){
  611. uni.showToast({
  612. icon: "none",
  613. duration: 3000,
  614. title: ress.msg +','+ `扫描内容:${data.code}`,
  615. });
  616. }else{
  617. uni.redirectTo({
  618. url: `../scanning_Result/scanning_Result?type=${
  619. this.queryObj.type
  620. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  621. ress.msg
  622. }&deptCode=${this.queryObj.deptCode}&dept=${
  623. this.queryObj.dept
  624. }&id=${this.dataId}&model=${encodeURIComponent(
  625. JSON.stringify(this.infoDATA)
  626. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  627. });
  628. }
  629. });
  630. } else {
  631. uni.hideLoading();
  632. }
  633. } else {
  634. uni.hideLoading();
  635. uni.showToast({
  636. icon: "none",
  637. title: result.info || "接口获取数据失败!",
  638. });
  639. }
  640. }).catch(err =>{
  641. this.SMFlag = true;
  642. });
  643. // ------------------------------
  644. },
  645. // 取消拦截
  646. // cancelError(){
  647. // this.errorModal = false
  648. // this.interceptData = null
  649. // this.speDATA = null
  650. // },
  651. // // 确定标本拦截
  652. // confirmError(e){
  653. // this.errorModal = false
  654. // this.interceptData = e
  655. // this.hand_scanning_common(this.interceptData.code, 'scan')
  656. // },
  657. // 查看未扫描标本
  658. // isScan true已扫描标本,false未扫描标本
  659. getNoScanSpecimen(isScan) {
  660. if (!this.gotoFlag) {
  661. return;
  662. }
  663. this.gotoFlag = false;
  664. if(isScan){
  665. uni.navigateTo({
  666. url: `../noScanSpecimen/noScanSpecimen?deptName=${this.queryObj.dept}&workOrderId=${encodeURIComponent(JSON.stringify([this.queryObj.id]))}&deptCode=${this.queryObj.deptCode}&isScan=1`,
  667. });
  668. }else{
  669. uni.navigateTo({
  670. url: `../noScanSpecimen/noScanSpecimen?deptName=${this.queryObj.dept}&workOrderId=${encodeURIComponent(JSON.stringify([this.queryObj.id]))}&deptCode=${this.queryObj.deptCode}`,
  671. });
  672. }
  673. },
  674. // 拍照
  675. photograph(data, obj) {
  676. photographTool(data, obj);
  677. },
  678. // 继续扫描
  679. Scanning_again() {
  680. // this.hand_scanning_common('250523620572@_1', 'scan')
  681. if (!this.SMFlag) {
  682. return;
  683. }
  684. this.SMFlag = false;
  685. SM().then((ress1) => {
  686. this.hand_scanning_common(ress1, 'scan');
  687. }).catch(err => {
  688. this.SMFlag = true;
  689. });
  690. },
  691. // pda扫描
  692. pdaChange(content){
  693. content = content.replace('\n','')
  694. this.hand_scanning_common(content, 'scan');
  695. },
  696. // 正常完成扫描
  697. overFinish() {
  698. let data = {
  699. type: this.queryObj.type1,
  700. ids: [this.wcId],
  701. };
  702. //只要是标本轮巡1对多或者多对多
  703. // plan-spe-dsd-2 1对多
  704. // plan-spe-dsd-3 多对多
  705. if (
  706. this.queryObj.type1 === "plan-spe-ddd-2" ||
  707. this.queryObj.type1 === "plan-spe-dsd-2" ||
  708. this.queryObj.type1 === "plan-spe-dsd-3"
  709. ) {
  710. post("/workerOrder/finishPlanSpes", data).then((res) => {
  711. // uni.hideLoading()
  712. if (res.status == 200) {
  713. this.models2 = {
  714. disjunctor: true,
  715. title: "提示",
  716. content: `完成扫描成功`,
  717. icon: "success",
  718. operate: {
  719. know: "返回",
  720. },
  721. };
  722. } else {
  723. uni.showToast({
  724. icon: "none",
  725. title: res.msg || "接口获取数据失败!",
  726. });
  727. }
  728. });
  729. } else {
  730. post("/workerOrder/finishSpes", data).then((res) => {
  731. // uni.hideLoading()
  732. if (res.status == 200) {
  733. uni.navigateTo({
  734. url: "../receiptpage/receiptpage",
  735. });
  736. } else {
  737. uni.showToast({
  738. icon: "none",
  739. title: res.msg || "接口获取数据失败!",
  740. });
  741. }
  742. });
  743. }
  744. },
  745. // 确定
  746. ok() {
  747. this.models.disjunctor = false;
  748. let postData = {
  749. ids: [this.queryObj.id],
  750. sign: true,
  751. deptQrCode: this.queryObj.deptCode
  752. };
  753. uni.showLoading({
  754. title: '加载中',
  755. mask: true
  756. });
  757. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  758. uni.hideLoading();
  759. if (ress.status == 200) {
  760. if (this.wcFlag) {
  761. //正常完成扫描
  762. this.overFinish()
  763. } else {
  764. this.gotoOver();
  765. }
  766. } else if (ress.status == 1000035) {
  767. let content = '';
  768. if (this.queryObj.type1 === 'spe-ddd-2' || this.queryObj.type1 === 'plan-spe-ddd-2') {
  769. //待到达
  770. content =
  771. `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
  772. } else {
  773. //待送达
  774. this.content =
  775. `本工单已签到<strong class="red">${ress.scanSet?ress.scanSet.join('、'):''}</strong>,剩余需签到科室<strong class="red">${ress.notScanSet?ress.notScanSet.join('、'):''}</strong>,总签收<strong class="red">${ress.totalAcceptance}</strong>只,剩余<strong class="red">${ress.notAcceptance}</strong>只未签收,您确定完成工单吗?`;
  776. content =
  777. `您在<strong class="red">${ress.deptName}</strong>检验科扫描了<strong class="red">${ress.deptScanNum}</strong>个标本,还需扫描<strong class="red">${ress.deptNotScanNum}</strong>标本。`;
  778. }
  779. // 取消弹窗 2022年10月10日
  780. this.ok2();
  781. // this.models2 = {
  782. // disjunctor: true,
  783. // title: "提示",
  784. // content,
  785. // icon: "warn",
  786. // operate: {
  787. // ok: "确定",
  788. // cancel: "取消",
  789. // },
  790. // };
  791. } else {
  792. uni.showToast({
  793. icon: "none",
  794. title: ress.msg || "接口获取数据失败!",
  795. });
  796. }
  797. })
  798. },
  799. // 取消
  800. cancel() {
  801. this.models.disjunctor = false;
  802. },
  803. // 确定
  804. ok2() {
  805. this.models2.disjunctor = false;
  806. let postData = {
  807. ids: [this.queryObj.id],
  808. deptQrCode: this.queryObj.deptCode
  809. };
  810. uni.showLoading({
  811. title: '加载中',
  812. mask: true
  813. });
  814. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  815. uni.hideLoading();
  816. if (ress.status == 200) {
  817. if (this.wcFlag) {
  818. this.overFinish()
  819. } else {
  820. this.gotoOver();
  821. }
  822. } else {
  823. uni.showToast({
  824. icon: "none",
  825. title: ress.msg || "接口获取数据失败!",
  826. });
  827. }
  828. })
  829. },
  830. // 取消
  831. cancel2() {
  832. this.models2.disjunctor = false;
  833. },
  834. know2() {
  835. this.models2.disjunctor = false;
  836. uni.navigateTo({
  837. url: "../receiptpage/receiptpage",
  838. });
  839. },
  840. // 配置收取
  841. configuration(id){
  842. uni.navigateTo({
  843. url: `../speConfigurationGather/speConfigurationGather?id=${id}`
  844. });
  845. },
  846. // 完成扫描
  847. Scanning_complete(id) {
  848. // 如果是标本配送和标本轮巡,则进入标本核对页面
  849. if((this.type === 'specimen' || this.type === 'specimenPlan') && this.queryObj.type1.includes('ddd')){
  850. uni.navigateTo({
  851. url: `../checkAfterScanning/checkAfterScanning?id=${id}&type=${this.queryObj.type}&type1=${this.queryObj.type1}&dept=${this.queryObj.dept}&deptId=${this.queryObj.deptId}&deptCode=${this.queryObj.deptCode}&speNum=${this.speNum}&content=${this.content}`,
  852. });
  853. return;
  854. }
  855. this.wcId = id;
  856. if (
  857. this.queryObj.type1 == "plan-spe-ddd-2" ||
  858. this.queryObj.type1 == "spe-ddd-2"
  859. ) {
  860. this.wcFlag = true;
  861. this.models = {
  862. disjunctor: true,
  863. title: "提示",
  864. content: "是否确定标本已扫描完成?",
  865. icon: "warn",
  866. operate: {
  867. ok: "确定",
  868. cancel: "取消",
  869. },
  870. };
  871. } else if (
  872. this.queryObj.type1 == "plan-spe-dsd-2" ||
  873. this.queryObj.type1 == "plan-spe-dsd-3" ||
  874. this.queryObj.type1 == "spe-dsd-2" ||
  875. this.queryObj.type1 == "spe-dsd-3"
  876. ) {
  877. this.wcFlag = false;
  878. this.models = {
  879. disjunctor: true,
  880. title: "提示",
  881. content: "是否确定标本已扫描完成?",
  882. icon: "warn",
  883. operate: {
  884. ok: "确定",
  885. cancel: "取消",
  886. },
  887. };
  888. } else {
  889. this.gotoOver();
  890. }
  891. },
  892. // 跳转完成工单页面
  893. gotoOver() {
  894. if(this.queryObj.type === 'specimenPlan'){
  895. uni.navigateTo({
  896. url: `../specimenCheckingEnd/specimenCheckingEnd?type=${this.queryObj.type}&type1=${
  897. this.queryObj.type1
  898. }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
  899. this.queryObj.deptCode
  900. }&dept=${this.queryObj.dept}&speNum=${this.speNum}&content=${this.content}`,
  901. });
  902. }else{
  903. uni.navigateTo({
  904. url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
  905. this.queryObj.type1
  906. }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
  907. this.queryObj.deptCode
  908. }&dept=${this.queryObj.dept}&speNum=${this.speNum}&content=${this.content}`,
  909. });
  910. }
  911. },
  912. // 继续执行工单,当扫错科室码的时候,直接跳过,默默执行正确的科室码
  913. goToRight(id) {
  914. // flag 为1时查检查科室,flag为2时查终点科室
  915. let flag;
  916. // 患者转科,患者陪检
  917. if (
  918. this.queryObj.type1 == "trans-dsd-1" ||
  919. this.queryObj.type1 == "ins-dsd-1"
  920. ) {
  921. flag = 2;
  922. }
  923. if (this.queryObj.type1 == "ins-zxz-1") {
  924. flag = 1;
  925. }
  926. let postData = {
  927. workOrderId: id,
  928. flag: flag,
  929. };
  930. uni.showLoading({
  931. title: "加载中",
  932. mask: true,
  933. });
  934. post("/workerOrder/continueWorkOrder", postData).then((res) => {
  935. uni.hideLoading();
  936. console.log(res);
  937. if (res.state == 200) {
  938. let radioItem = [];
  939. res.data.forEach((item) => {
  940. let flag = radioItem.every(
  941. (item1) => item1.qrcode !== item.qrcode + "__" + item.deptName
  942. ); //如果radioItem里的所有项都与之不重复
  943. if (flag) {
  944. radioItem.push({
  945. qrcode: item.qrcode + "__" + item.deptName,
  946. deptName: item.deptName,
  947. });
  948. }
  949. });
  950. this.models1 = {
  951. disjunctor: true,
  952. title: "请选择正确的科室",
  953. radioItem,
  954. icon: "",
  955. operate: {
  956. ok: "确定",
  957. cancel: "取消",
  958. },
  959. };
  960. } else {
  961. uni.showToast({
  962. icon: "none",
  963. title: res.msg || "接口获取数据失败!",
  964. });
  965. }
  966. });
  967. },
  968. // 选中单选框
  969. radioChange1(item) {
  970. console.log(item);
  971. this.selectRadio = item.split("__");
  972. },
  973. // 确定
  974. ok1() {
  975. this.models1.disjunctor = false;
  976. if (!this.selectRadio.length) {
  977. //默认选中第一项,选中则是选中项
  978. this.selectRadio = [
  979. this.models1.radioItem[0].qrcode.split("__")[0],
  980. this.models1.radioItem[0].deptName,
  981. ];
  982. }
  983. uni.navigateTo({
  984. url: `../scanning_code/scanning_code?type=${this.queryObj.type}&type1=${this.queryObj.type1}&id=${this.queryObj.id}&deptCode=${this.selectRadio[0]}&dept=${this.selectRadio[1]}`,
  985. });
  986. },
  987. // 取消
  988. cancel1() {
  989. this.models1.disjunctor = false;
  990. },
  991. // 返回
  992. showAlert(id) {
  993. uni.navigateTo({
  994. url: "../receiptpage/receiptpage"
  995. });
  996. },
  997. // 获取问卷配置
  998. getQuestionnaireSet(){
  999. uni.showLoading({
  1000. title: "加载中",
  1001. mask: true,
  1002. });
  1003. const userData = uni.getStorageSync("userData");
  1004. post("/simple/data/fetchDataList/questionnaireConfig",{
  1005. questionnaireConfig:{
  1006. hosId:userData.user.currentHospital.id
  1007. },
  1008. idx:0,
  1009. sum:10
  1010. }).then((res) => {
  1011. uni.hideLoading();
  1012. if (res.status == 200) {
  1013. let data = res.list[0];
  1014. if(data.taskTypeDTOS.length>0 && data.questionnaireDTOS.length>0){
  1015. let isQuestion = data.taskTypeDTOS.find(i=> i.id == this.taskTypeId)
  1016. if(isQuestion){
  1017. this.isQuestionModel = true
  1018. }
  1019. }
  1020. } else {
  1021. uni.showToast({
  1022. icon: "none",
  1023. title: res.msg || "接口获取数据失败!",
  1024. });
  1025. }
  1026. });
  1027. },
  1028. // 页面控制-标本
  1029. getPageConfigSpecimen(fn, type, specimenDTO, ress){
  1030. const userData = uni.getStorageSync("userData");
  1031. console.log('userData', userData);
  1032. console.log('specimenDTO', specimenDTO);
  1033. uni.showLoading({
  1034. title: "加载中",
  1035. mask: true,
  1036. });
  1037. // 查询标本配送业务
  1038. post("/simple/data/fetchDataList/taskType",{
  1039. "idx": 0,
  1040. "sum": 10,
  1041. "taskType": {
  1042. "simpleQuery": true,
  1043. "hosId": {
  1044. "id": userData.user.currentHospital.id
  1045. },
  1046. "associationType": {
  1047. "key": "association_types",
  1048. "value": "specimen"
  1049. }
  1050. }
  1051. }).then((res) => {
  1052. if (res.status == 200) {
  1053. let taskTypeDTO = res.list[0];
  1054. if(taskTypeDTO){
  1055. // 查询业务页面控制-标本
  1056. post("/simple/data/fetchDataList/taskTypeConfig",{
  1057. "idx": 0,
  1058. "sum": 10,
  1059. "taskTypeConfig": {
  1060. taskTypeDTO,
  1061. }
  1062. }).then((res) => {
  1063. uni.hideLoading();
  1064. if (res.status == 200) {
  1065. let data = res.list[0];
  1066. if(data){
  1067. // this.speCollectLimit = data.speCollectLimit;
  1068. let deptNotAlertList = data.deptNotAlertList || [];
  1069. deptNotAlertList = deptNotAlertList.map(v => v.id);
  1070. if(deptNotAlertList.includes(specimenDTO && specimenDTO.checkDept.id)){
  1071. this.isEndDeptRed = true;
  1072. console.log('红色')
  1073. fn(false, type, ress);
  1074. }else{
  1075. this.isEndDeptRed = false;
  1076. fn(true, type, ress);
  1077. }
  1078. console.log('this.isEndDeptRed', this.isEndDeptRed);
  1079. }else{
  1080. this.isEndDeptRed = false;
  1081. fn(true, type, ress);
  1082. }
  1083. } else {
  1084. uni.showToast({
  1085. icon: "none",
  1086. title: res.msg || "接口获取数据失败!",
  1087. });
  1088. }
  1089. });
  1090. }else{
  1091. uni.hideLoading();
  1092. uni.showToast({
  1093. icon: "none",
  1094. title: "未查询到标本配送业务!",
  1095. });
  1096. }
  1097. } else {
  1098. uni.hideLoading();
  1099. uni.showToast({
  1100. icon: "none",
  1101. title: res.msg || "接口获取数据失败!",
  1102. });
  1103. }
  1104. });
  1105. },
  1106. getSys(){
  1107. const userData = uni.getStorageSync("userData");
  1108. console.log('userData', userData);
  1109. // uni.showLoading({
  1110. // title: "加载中",
  1111. // mask: true,
  1112. // });
  1113. // 查询标本配送业务
  1114. post("/simple/data/fetchDataList/taskType",{
  1115. "idx": 0,
  1116. "sum": 10,
  1117. "taskType": {
  1118. "simpleQuery": true,
  1119. "hosId": {
  1120. "id": userData.user.currentHospital.id
  1121. },
  1122. "associationType": {
  1123. "key": "association_types",
  1124. "value": "specimen"
  1125. }
  1126. }
  1127. }).then((res) => {
  1128. if (res.status == 200) {
  1129. let taskTypeDTO = res.list[0];
  1130. if(taskTypeDTO){
  1131. // 查询业务页面控制-标本
  1132. post("/simple/data/fetchDataList/taskTypeConfig",{
  1133. "idx": 0,
  1134. "sum": 10,
  1135. "taskTypeConfig": {
  1136. taskTypeDTO,
  1137. }
  1138. }).then((res) => {
  1139. // uni.hideLoading();
  1140. if (res.status == 200) {
  1141. let data = res.list[0];
  1142. if(data){
  1143. this.speCollectLimit = data.speCollectLimit;
  1144. }
  1145. } else {
  1146. uni.showToast({
  1147. icon: "none",
  1148. title: res.msg || "接口获取数据失败!",
  1149. });
  1150. }
  1151. });
  1152. }else{
  1153. uni.hideLoading();
  1154. uni.showToast({
  1155. icon: "none",
  1156. title: "未查询到标本配送业务!",
  1157. });
  1158. }
  1159. } else {
  1160. uni.hideLoading();
  1161. uni.showToast({
  1162. icon: "none",
  1163. title: res.msg || "接口获取数据失败!",
  1164. });
  1165. }
  1166. });
  1167. }
  1168. },
  1169. onShow() {
  1170. this.SMFlag = true;
  1171. this.gotoFlag = true;
  1172. let that = this
  1173. // #ifdef APP-PLUS
  1174. uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
  1175. uni.$on('scan', function(data) {
  1176. that.pdaChange(data)
  1177. })
  1178. // #endif
  1179. },
  1180. onLoad(options) {
  1181. console.log(77776666,options)
  1182. this.intercept = options.intercept
  1183. this.isShow = options.isShow
  1184. this.isEndDeptRedShow = options.isEndDeptRed === 'true';
  1185. this.getSys()
  1186. if (options.status == 200&&(options.scanOrHand === 'hand')&&(options.type === "specimen"||options.type === "specimenPlan")) {
  1187. this.getPageConfigSpecimen((flag) => {
  1188. if(flag){
  1189. this.hand_again();
  1190. }
  1191. });
  1192. }
  1193. // else if(options.scanOrHand === 'scan'){
  1194. // if(options.isShow==1){
  1195. // this.getPageConfigSpecimen((flag, type, ress) => {
  1196. // if(flag){
  1197. // setTimeout(()=>{
  1198. // // #ifdef H5
  1199. // this.Scanning_again();
  1200. // // #endif
  1201. // },500)
  1202. // }
  1203. // })
  1204. // }
  1205. // }
  1206. console.log(options , "options");
  1207. this.queryObj = options;
  1208. this.isKs = this.queryObj.isKs;
  1209. if (options.infoData && options.infoData != "undefined") {
  1210. this.infoDATA = JSON.parse(options.infoData);
  1211. } else if (options.model) {
  1212. this.infoDATA = JSON.parse(options.model);
  1213. }
  1214. console.log(this.infoDATA , "infoDATA");
  1215. if (options.accountObj && options.accountObj != "undefined") {
  1216. this.accountObj = JSON.parse(options.accountObj);
  1217. }
  1218. if (options.deptId && options.deptId != "undefined") {
  1219. this.deptId = options.deptId;
  1220. }
  1221. if (options.handover && options.handover != "undefined") {
  1222. this.handover = options.handover;
  1223. }
  1224. this.dataId = options.id;
  1225. if(options.taskTypeId){
  1226. this.taskTypeId = options.taskTypeId
  1227. }else if(this.infoDATA.workOrderList && this.infoDATA.workOrderList.length>0){
  1228. this.taskTypeId = this.infoDATA.workOrderList[0].taskType.id
  1229. }
  1230. this.RESData = options.resData;
  1231. this.res["status"] = options.status;
  1232. this.res["msg"] = options.msg;
  1233. console.log(options.patient);
  1234. this.res["patient"] = options.patient;
  1235. this.res["patientCode"] = options.patientCode;
  1236. this.res["deptName"] = options.deptName;
  1237. this.res["bedNum"] = options.bedNum;
  1238. this.infoType = options.type1;
  1239. if((this.infoType == 'trans-dsd-1' || this.infoType == 'ins-dsd-1'
  1240. || this.infoType == 'ins-half-ok' || this.infoDATA.type == 'ins-half-ok')
  1241. && this.res.status == 200){
  1242. this.getQuestionnaireSet()
  1243. }
  1244. if(
  1245. this.res.status == 200 &&
  1246. this.infoType != 'ins-zxz-1' &&
  1247. this.infoType != 'ins-dsd-1' &&
  1248. this.infoType != 'ins-ddd-1' &&
  1249. this.infoType != 'trans-ddd-1' &&
  1250. this.infoType != 'trans-dsd-1'){
  1251. this.getQuestionnaireSet()
  1252. }
  1253. if (options.dept) {
  1254. this.DEPT = options.dept;
  1255. }
  1256. if (options.speNum) {
  1257. this.speNum = options.speNum;
  1258. }
  1259. this.DEPTCode = options.deptCode;
  1260. this.type = options.type;
  1261. // 标本收取拦截参数
  1262. let sessData = `type=${
  1263. this.queryObj.type
  1264. }&type1=${
  1265. this.queryObj.type1
  1266. }&infoData=${options.infoData}&status=${options.status}&msg=${options.msg}&deptCode=${
  1267. this.queryObj.deptCode
  1268. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${options.model}&speNum=${this.speNum}&scanOrHand=${options.scanOrHand}&isEndDeptRed=${options.isEndDeptRed}`
  1269. uni.setStorageSync('gdData', JSON.stringify(sessData))
  1270. // #ifdef APP-PLUS
  1271. webHandle("no", "app");
  1272. // #endif
  1273. // #ifdef H5
  1274. webHandle("no", "wx");
  1275. // #endif
  1276. },
  1277. };
  1278. </script>
  1279. <style lang="less">
  1280. .Scanning_Result {
  1281. padding: 0 24rpx;
  1282. height: 96vh;
  1283. position: relative;
  1284. .Scanning_top {
  1285. .Scanning_top_icon {
  1286. width: 140rpx;
  1287. height: 140rpx;
  1288. margin: 0 auto;
  1289. margin-top: 40rpx;
  1290. border-radius: 50%;
  1291. line-height: 140rpx;
  1292. .speNum{
  1293. text-align: center;
  1294. font-size: 140rpx;
  1295. }
  1296. .cubeic-ok {
  1297. font-size: 140rpx;
  1298. color: #35b34a;
  1299. }
  1300. .cubeic-close {
  1301. font-size: 140rpx;
  1302. color: #ff3b53;
  1303. }
  1304. }
  1305. .Scanning_top_text {
  1306. .text1 {
  1307. font-size: 48rpx;
  1308. text-align: center;
  1309. }
  1310. .success_tips {
  1311. color: red;
  1312. font-size: 30rpx;
  1313. }
  1314. }
  1315. }
  1316. .spe{
  1317. height: 50vh;
  1318. }
  1319. .Scanning_cont {
  1320. font-size: 32rpx;
  1321. // text-align: center;
  1322. margin-top: 40rpx;
  1323. // height: 50vh;
  1324. overflow-y: auto;
  1325. .df{
  1326. display: flex;
  1327. align-items: center;
  1328. margin-bottom: 14rpx;
  1329. position: relative;
  1330. .newicon{
  1331. margin: 0 8rpx;
  1332. }
  1333. .mar-le{
  1334. margin-left: 20rpx;
  1335. }
  1336. .po-ab{
  1337. position: absolute;
  1338. right: 0;
  1339. }
  1340. }
  1341. .width-100{
  1342. width: 160rpx;
  1343. font-weight: 600;
  1344. text-align-last: justify;
  1345. }
  1346. .Scanning_cont_center {
  1347. text-align: center;
  1348. }
  1349. .text {
  1350. margin-top: 24rpx;
  1351. color: #35b34a;
  1352. }
  1353. .text1 {
  1354. margin-top: 24rpx;
  1355. color: #ff3b53;
  1356. }
  1357. }
  1358. .foot_btn {
  1359. line-height: 88rpx;
  1360. height: 100rpx;
  1361. margin-top: 40rpx;
  1362. display: flex;
  1363. justify-content: center;
  1364. // position: absolute;
  1365. // bottom: 20rpx;
  1366. // width: 100%;
  1367. .btn1,
  1368. .btn2,
  1369. .btn3 {
  1370. height: 88rpx;
  1371. flex: 1;
  1372. margin: 0 2%;
  1373. background-image: linear-gradient(to right, #72c172, #3bb197);
  1374. color: #fff;
  1375. border-radius: 8rpx;
  1376. font-size: 32rpx;
  1377. margin-top: 16rpx;
  1378. text-align: center;
  1379. }
  1380. }
  1381. .foot_btn_spe {
  1382. line-height: 88rpx;
  1383. // height: 100rpx;
  1384. // margin-top: 40rpx;
  1385. text-align: center;
  1386. display: flex;
  1387. justify-content: space-between;
  1388. flex-wrap: wrap;
  1389. // &::after {
  1390. // content: '';
  1391. // flex: 1;
  1392. // }
  1393. view {
  1394. height: 88rpx;
  1395. width: 48%;
  1396. // margin: 0 1%;
  1397. background-image: linear-gradient(to right, #72c172, #3bb197);
  1398. color: #fff;
  1399. border-radius: 8rpx;
  1400. font-size: 32rpx;
  1401. margin-top: 16rpx;
  1402. }
  1403. }
  1404. }
  1405. </style>