scanning_Result.vue 49 KB

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