scanning_Result.vue 50 KB

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