scanning_Result.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987
  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 icon_transport transport-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 icon_transport transport-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 icon_transport transport-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="icon_transport transport-arrow-right-full"></text>
  43. {{ infoDATA.checkDept ? infoDATA.checkDept.dept : "" }}
  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="icon_transport transport-arrow-right-full"></text>
  58. {{ infoDATA.checkDept ? infoDATA.checkDept.dept : "" }}
  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>
  136. <view class="foot_btn" v-if="
  137. (type != 'specimenPlan' &&
  138. type != 'specimen' &&
  139. type != 'drugsBag' &&
  140. type != 'jPBag' &&
  141. (type != 'inspect') & (type != 'patientTransport')) ||
  142. (queryObj.status == 200 &&
  143. type == 'drugsBag' &&
  144. infoType == 'drug-ddd-2') ||
  145. (queryObj.status == 200 &&
  146. type == 'drugsBag' &&
  147. infoType == 'drug-dsd-2') ||
  148. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-ddd-2') ||
  149. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-dsd-2') ||
  150. (queryObj.status == 200 && type == 'inspect') ||
  151. (queryObj.status == 200 && type == 'patientTransport')
  152. ">
  153. <view class="btn3" @click="Scanning_again()" v-if="type == 'drugsBag'||type == 'jPBag'"> 继续扫描 </view>
  154. <view class="btn3" @click="showAlert(dataId)"> 知道了 </view>
  155. </view>
  156. <view class="foot_btn" v-if="
  157. (isKs != '1' &&
  158. queryObj.status != 200 &&
  159. type == 'drugsBag' &&
  160. infoType == 'drug-ddd-2') ||
  161. (isKs != '1' &&
  162. queryObj.status != 200 &&
  163. type == 'drugsBag' &&
  164. infoType == 'drug-dsd-2') ||
  165. (isKs != '1' &&
  166. queryObj.status != 200 &&
  167. type == 'jPBag' &&
  168. infoType == 'jp-ddd-2') ||
  169. (isKs != '1' &&
  170. queryObj.status != 200 &&
  171. type == 'jPBag' &&
  172. infoType == 'jp-dsd-2') ||
  173. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  174. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  175. ">
  176. <view class="btn3" @click="Scanning_again()"> 继续扫描 </view>
  177. <view class="btn3" @click="showAlert()" v-if="type == 'drugsBag'"> 知道了 </view>
  178. <view class="btn3" @click="photograph(queryObj, { DEPTCode, DEPT, infoType })" v-if="
  179. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  180. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  181. ">
  182. 拍照
  183. </view>
  184. </view>
  185. <view class="foot_btn" v-if="
  186. infoType == 'spe-ddd-1' ||
  187. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-2') ||
  188. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-1') ||
  189. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-ddd-2') ||
  190. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-3') ||
  191. (isKs == '1' &&
  192. queryObj.status != 200 &&
  193. infoType == 'plan-spe-ddd-1') ||
  194. (isKs == '1' &&
  195. queryObj.status != 200 &&
  196. infoType == 'plan-spe-ddd-2') ||
  197. (isKs == '1' &&
  198. queryObj.status != 200 &&
  199. infoType == 'plan-spe-dsd-1') ||
  200. (isKs == '1' &&
  201. queryObj.status != 200 &&
  202. infoType == 'plan-spe-dsd-2') ||
  203. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-2') ||
  204. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-2') ||
  205. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-2') ||
  206. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-2') ||
  207. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-1') ||
  208. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-1') ||
  209. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-1') ||
  210. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-1') ||
  211. (isKs == '1' &&
  212. queryObj.status != 200 &&
  213. infoType == 'plan-spe-dsd-3') ||
  214. (isKs == '1' &&
  215. queryObj.status != 200 &&
  216. type == 'inspect' &&
  217. queryObj.type1 === 'undefined') ||
  218. (isKs == '1' &&
  219. queryObj.status != 200 &&
  220. type == 'patientTransport' &&
  221. queryObj.type1 === 'undefined')
  222. ">
  223. <view class="btn3" @click="showAlert(dataId)"> 知道了 </view>
  224. </view>
  225. <view class="foot_btn" v-if="
  226. (isKs == '1' &&
  227. queryObj.status != 200 &&
  228. type == 'inspect' &&
  229. queryObj.type1 === 'ins-zxz-1') ||
  230. (isKs == '1' &&
  231. queryObj.status != 200 &&
  232. type == 'inspect' &&
  233. queryObj.type1 === 'ins-dsd-1') ||
  234. (isKs == '1' &&
  235. queryObj.status != 200 &&
  236. type == 'patientTransport' &&
  237. queryObj.type1 === 'trans-dsd-1')
  238. ">
  239. <view class="btn1" @click="showAlert(dataId)"> 知道了 </view>
  240. <view class="btn2" @click="goToRight(dataId)"> 继续执行工单 </view>
  241. </view>
  242. <!-- 弹窗 -->
  243. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  244. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  245. <!-- 弹窗 -->
  246. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  247. :radioItem="models1.radioItem" @ok="ok1" @radioChange="radioChange1" @cancel="cancel1" :operate="models1.operate">
  248. </showModel>
  249. <!-- 弹窗 -->
  250. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  251. @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate">
  252. </showModel>
  253. <!-- 手动查询标本弹窗 -->
  254. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  255. @ok="speOk" @cancel="speCancel">
  256. </handViewSpecimen>
  257. </view>
  258. </template>
  259. <script>
  260. import showModel from "../../components/showModel/showModel.vue";
  261. import {
  262. get,
  263. post,
  264. SM,
  265. webHandle
  266. } from "../../http/http.js";
  267. import {
  268. photographTool
  269. } from "../../tools/photograph.js";
  270. import {
  271. DRUGSBAG_TYPE
  272. } from '../../tools/enum.drugsbagType.js';
  273. export default {
  274. data() {
  275. return {
  276. DRUGSBAG_TYPE,
  277. currentCode: '', //当前小扫描的科室二维码
  278. // 手动查询标本弹窗model
  279. speModels: {
  280. disjunctor: false,
  281. },
  282. deptId: undefined,
  283. handover: undefined,
  284. SMFlag: true,
  285. // 交接人信息
  286. accountObj: undefined,
  287. // 完成扫描的id
  288. wcId: "",
  289. wcFlag: false,
  290. // 弹窗model
  291. models: {
  292. disjunctor: false,
  293. },
  294. // 单选框弹窗model1
  295. models1: {
  296. disjunctor: false,
  297. },
  298. // 完成扫描弹窗model1
  299. models2: {
  300. disjunctor: false,
  301. },
  302. isKs: "", //是否科室签到 1
  303. infoDATA: {},
  304. res: {},
  305. infoType: "",
  306. DEPTCode: "",
  307. RESData: {},
  308. DEPT: "",
  309. dataId: "",
  310. type: "",
  311. model: {},
  312. speNum: 0,
  313. queryObj: {}, //路由传递过来的数据
  314. selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
  315. gotoFlag: true,
  316. content: "",
  317. };
  318. },
  319. methods: {
  320. // 手动查询标本-确认
  321. speOk(data) {
  322. console.log(data);
  323. if (!data.id) {
  324. //没有查询到标本
  325. uni.showModal({
  326. title: '提示',
  327. content: "没有查询到标本!",
  328. showCancel: false,
  329. success: function(res) {
  330. if (res.confirm) {
  331. console.log('用户点击确定');
  332. } else if (res.cancel) {
  333. console.log('用户点击取消');
  334. }
  335. }
  336. });
  337. return;
  338. }
  339. this.speModels.disjunctor = false;
  340. this.hand_scanning_common(data.scode, 'hand');
  341. },
  342. // 手动查询标本-取消
  343. speCancel() {
  344. this.speModels.disjunctor = false;
  345. },
  346. // 手动查询标本弹窗
  347. showHandViewSpecimen() {
  348. this.speModels = {
  349. title: '填写标本编码',
  350. disjunctor: true,
  351. }
  352. },
  353. // 手动录入标本
  354. hand_again() {
  355. this.showHandViewSpecimen();
  356. },
  357. // 手动输入标本和扫码公共方法
  358. hand_scanning_common(ress1, type) {
  359. // ----------------
  360. uni.showLoading({
  361. title: "加载中",
  362. mask: true,
  363. });
  364. //检验二维码的有效性
  365. post("/dept/scanning", {
  366. content: ress1,
  367. }).then((result) => {
  368. this.SMFlag = true;
  369. this.currentCode = result.code;
  370. if (result.state == 200 || result.state == 201) {
  371. let codes = result.code;
  372. if (codes) {
  373. let speCode = codes;
  374. let data = {
  375. code: speCode,
  376. type: this.queryObj.type1,
  377. deptCode: this.DEPTCode,
  378. ids: [],
  379. };
  380. data.ids.push(this.dataId);
  381. let postType = "";
  382. if (this.type == "jPBag" || this.type == "drugsBag") {
  383. postType = "handleDrugsAndJp";
  384. delete data.ids;
  385. data.deptId = this.deptId;
  386. data.handover = this.handover;
  387. }
  388. if (this.type == "specimen") {
  389. data["speCode"] = data.code;
  390. delete data.code;
  391. postType = "handleSpes";
  392. }
  393. if (this.type == "specimenPlan") {
  394. data["speCode"] = data.code;
  395. delete data.code;
  396. postType = "handlePlanSpes";
  397. }
  398. if (this.type == "inspect") {
  399. postType = "handleIns";
  400. }
  401. if (this.type == "patientTransport") {
  402. postType = "handleTrans";
  403. }
  404. post("/workerOrder/" + postType, data).then((ress) => {
  405. uni.hideLoading();
  406. if (ress.status == 200 || ress.status == 11111) {
  407. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  408. if ((this.type == "specimenPlan" || this.type == "specimen") && ress.status != 11111) {
  409. setTimeout(()=>{
  410. if (type === 'scan') {
  411. this.Scanning_again();
  412. }
  413. },500)
  414. }
  415. if (this.type == "specimenPlan" || this.type == "specimen") {
  416. this.infoDATA = ress.data;
  417. this.speNum = ress.specimenCount;
  418. uni.redirectTo({
  419. url: `../scanning_Result/scanning_Result?type=${
  420. this.queryObj.type
  421. }&type1=${
  422. this.queryObj.type1
  423. }&infoData=${encodeURIComponent(
  424. JSON.stringify(ress.data)
  425. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  426. this.queryObj.deptCode
  427. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}`,
  428. });
  429. } else if (
  430. this.type == "inspect" ||
  431. this.type == "patientTransport"
  432. ) {
  433. uni.redirectTo({
  434. url: `../scanning_Result/scanning_Result?type=${
  435. this.queryObj.type //baba
  436. }&type1=${
  437. this.queryObj.type1
  438. }&infoData=${encodeURIComponent(
  439. JSON.stringify(ress.data)
  440. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  441. this.queryObj.deptCode
  442. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  443. JSON.stringify(ress)
  444. )}&patient=${ress.patient}&patientCode=${
  445. ress.patientCode
  446. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  447. });
  448. } else {
  449. uni.redirectTo({
  450. url: `../scanning_Result/scanning_Result?type=${
  451. this.queryObj.type
  452. }&type1=${
  453. this.queryObj.type1
  454. }&infoData=${encodeURIComponent(
  455. JSON.stringify(ress.data)
  456. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  457. this.queryObj.deptCode
  458. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  459. });
  460. }
  461. } else {
  462. uni.redirectTo({
  463. url: `../scanning_Result/scanning_Result?type=${
  464. this.queryObj.type
  465. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  466. ress.msg
  467. }&deptCode=${this.queryObj.deptCode}&dept=${
  468. this.queryObj.dept
  469. }&id=${this.dataId}&model=${encodeURIComponent(
  470. JSON.stringify(this.infoDATA)
  471. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  472. });
  473. }
  474. });
  475. } else {
  476. uni.hideLoading();
  477. }
  478. } else {
  479. uni.hideLoading();
  480. uni.showToast({
  481. icon: "none",
  482. title: result.info || "接口获取数据失败!",
  483. });
  484. }
  485. });
  486. // ------------------------------
  487. },
  488. // 查看未扫描标本
  489. // isScan true已扫描标本,false未扫描标本
  490. getNoScanSpecimen(isScan) {
  491. if (!this.gotoFlag) {
  492. return;
  493. }
  494. this.gotoFlag = false;
  495. if(isScan){
  496. uni.navigateTo({
  497. url: `../noScanSpecimen/noScanSpecimen?deptName=${this.queryObj.dept}&workOrderId=${encodeURIComponent(JSON.stringify([this.queryObj.id]))}&deptCode=${this.queryObj.deptCode}&isScan=1`,
  498. });
  499. }else{
  500. uni.navigateTo({
  501. url: `../noScanSpecimen/noScanSpecimen?deptName=${this.queryObj.dept}&workOrderId=${encodeURIComponent(JSON.stringify([this.queryObj.id]))}&deptCode=${this.queryObj.deptCode}`,
  502. });
  503. }
  504. },
  505. // 拍照
  506. photograph(data, obj) {
  507. photographTool(data, obj);
  508. },
  509. // 继续扫描
  510. Scanning_again() {
  511. if (!this.SMFlag) {
  512. return;
  513. }
  514. this.SMFlag = false;
  515. SM().then((ress1) => {
  516. this.hand_scanning_common(ress1, 'scan');
  517. }).catch(err => {
  518. this.SMFlag = true;
  519. });
  520. },
  521. // 正常完成扫描
  522. overFinish() {
  523. let data = {
  524. type: this.queryObj.type1,
  525. ids: [this.wcId],
  526. };
  527. //只要是标本轮巡1对多或者多对多
  528. // plan-spe-dsd-2 1对多
  529. // plan-spe-dsd-3 多对多
  530. if (
  531. this.queryObj.type1 === "plan-spe-ddd-2" ||
  532. this.queryObj.type1 === "plan-spe-dsd-2" ||
  533. this.queryObj.type1 === "plan-spe-dsd-3"
  534. ) {
  535. post("/workerOrder/finishPlanSpes", data).then((res) => {
  536. // uni.hideLoading()
  537. if (res.status == 200) {
  538. this.models2 = {
  539. disjunctor: true,
  540. title: "提示",
  541. content: `完成扫描成功`,
  542. icon: "success",
  543. operate: {
  544. know: "知道了",
  545. },
  546. };
  547. } else {
  548. uni.showToast({
  549. icon: "none",
  550. title: res.msg || "接口获取数据失败!",
  551. });
  552. }
  553. });
  554. } else {
  555. post("/workerOrder/finishSpes", data).then((res) => {
  556. // uni.hideLoading()
  557. if (res.status == 200) {
  558. uni.navigateTo({
  559. url: "../receiptpage/receiptpage",
  560. });
  561. } else {
  562. uni.showToast({
  563. icon: "none",
  564. title: res.msg || "接口获取数据失败!",
  565. });
  566. }
  567. });
  568. }
  569. },
  570. // 确定
  571. ok() {
  572. this.models.disjunctor = false;
  573. let postData = {
  574. ids: [this.queryObj.id],
  575. sign: true,
  576. deptQrCode: this.queryObj.deptCode
  577. };
  578. uni.showLoading({
  579. title: '加载中',
  580. mask: true
  581. });
  582. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  583. uni.hideLoading();
  584. if (ress.status == 200) {
  585. if (this.wcFlag) {
  586. //正常完成扫描
  587. this.overFinish()
  588. } else {
  589. this.gotoOver();
  590. }
  591. } else if (ress.status == 1000035) {
  592. let content = '';
  593. if (this.queryObj.type1 === 'spe-ddd-2' || this.queryObj.type1 === 'plan-spe-ddd-2') {
  594. //待到达
  595. content =
  596. `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
  597. } else {
  598. //待送达
  599. this.content =
  600. `本工单已签到<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>只未签收,您确定完成工单吗?`;
  601. content =
  602. `您在<strong class="red">${ress.deptName}</strong>检验科扫描了<strong class="red">${ress.deptScanNum}</strong>个标本,还需扫描<strong class="red">${ress.deptNotScanNum}</strong>标本。`;
  603. }
  604. // 取消弹窗 2022年10月10日
  605. this.ok2();
  606. // this.models2 = {
  607. // disjunctor: true,
  608. // title: "提示",
  609. // content,
  610. // icon: "warn",
  611. // operate: {
  612. // ok: "确定",
  613. // cancel: "取消",
  614. // },
  615. // };
  616. } else {
  617. uni.showToast({
  618. icon: "none",
  619. title: ress.msg || "接口获取数据失败!",
  620. });
  621. }
  622. })
  623. },
  624. // 取消
  625. cancel() {
  626. this.models.disjunctor = false;
  627. },
  628. // 确定
  629. ok2() {
  630. this.models2.disjunctor = false;
  631. let postData = {
  632. ids: [this.queryObj.id],
  633. deptQrCode: this.queryObj.deptCode
  634. };
  635. uni.showLoading({
  636. title: '加载中',
  637. mask: true
  638. });
  639. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  640. uni.hideLoading();
  641. if (ress.status == 200) {
  642. if (this.wcFlag) {
  643. this.overFinish()
  644. } else {
  645. this.gotoOver();
  646. }
  647. } else {
  648. uni.showToast({
  649. icon: "none",
  650. title: ress.msg || "接口获取数据失败!",
  651. });
  652. }
  653. })
  654. },
  655. // 取消
  656. cancel2() {
  657. this.models2.disjunctor = false;
  658. },
  659. know2() {
  660. this.models2.disjunctor = false;
  661. uni.navigateTo({
  662. url: "../receiptpage/receiptpage",
  663. });
  664. },
  665. // 完成扫描
  666. Scanning_complete(id) {
  667. // 如果是标本配送和标本轮巡,则进入标本核对页面
  668. if((this.type === 'specimen' || this.type === 'specimenPlan') && this.queryObj.type1.includes('ddd')){
  669. uni.navigateTo({
  670. 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}`,
  671. });
  672. return;
  673. }
  674. this.wcId = id;
  675. if (
  676. this.queryObj.type1 == "plan-spe-ddd-2" ||
  677. this.queryObj.type1 == "spe-ddd-2"
  678. ) {
  679. this.wcFlag = true;
  680. this.models = {
  681. disjunctor: true,
  682. title: "提示",
  683. content: "是否确定标本已扫描完成?",
  684. icon: "warn",
  685. operate: {
  686. ok: "确定",
  687. cancel: "取消",
  688. },
  689. };
  690. } else if (
  691. this.queryObj.type1 == "plan-spe-dsd-2" ||
  692. this.queryObj.type1 == "plan-spe-dsd-3" ||
  693. this.queryObj.type1 == "spe-dsd-2" ||
  694. this.queryObj.type1 == "spe-dsd-3"
  695. ) {
  696. this.wcFlag = false;
  697. this.models = {
  698. disjunctor: true,
  699. title: "提示",
  700. content: "是否确定标本已扫描完成?",
  701. icon: "warn",
  702. operate: {
  703. ok: "确定",
  704. cancel: "取消",
  705. },
  706. };
  707. } else {
  708. this.gotoOver();
  709. }
  710. },
  711. // 跳转完成工单页面
  712. gotoOver() {
  713. if(this.queryObj.type === 'specimenPlan'){
  714. uni.navigateTo({
  715. url: `../specimenCheckingEnd/specimenCheckingEnd?type=${this.queryObj.type}&type1=${
  716. this.queryObj.type1
  717. }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
  718. this.queryObj.deptCode
  719. }&dept=${this.queryObj.dept}&speNum=${this.speNum}&content=${this.content}`,
  720. });
  721. }else{
  722. uni.navigateTo({
  723. url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
  724. this.queryObj.type1
  725. }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
  726. this.queryObj.deptCode
  727. }&dept=${this.queryObj.dept}&speNum=${this.speNum}&content=${this.content}`,
  728. });
  729. }
  730. },
  731. // 继续执行工单,当扫错科室码的时候,直接跳过,默默执行正确的科室码
  732. goToRight(id) {
  733. // flag 为1时查检查科室,flag为2时查终点科室
  734. let flag;
  735. // 患者转科,患者陪检
  736. if (
  737. this.queryObj.type1 == "trans-dsd-1" ||
  738. this.queryObj.type1 == "ins-dsd-1"
  739. ) {
  740. flag = 2;
  741. }
  742. if (this.queryObj.type1 == "ins-zxz-1") {
  743. flag = 1;
  744. }
  745. let postData = {
  746. workOrderId: id,
  747. flag: flag,
  748. };
  749. uni.showLoading({
  750. title: "加载中",
  751. mask: true,
  752. });
  753. post("/workerOrder/continueWorkOrder", postData).then((res) => {
  754. uni.hideLoading();
  755. console.log(res);
  756. if (res.state == 200) {
  757. let radioItem = [];
  758. res.data.forEach((item) => {
  759. let flag = radioItem.every(
  760. (item1) => item1.qrcode !== item.qrcode + "__" + item.deptName
  761. ); //如果radioItem里的所有项都与之不重复
  762. if (flag) {
  763. radioItem.push({
  764. qrcode: item.qrcode + "__" + item.deptName,
  765. deptName: item.deptName,
  766. });
  767. }
  768. });
  769. this.models1 = {
  770. disjunctor: true,
  771. title: "请选择正确的科室",
  772. radioItem,
  773. icon: "",
  774. operate: {
  775. ok: "确定",
  776. cancel: "取消",
  777. },
  778. };
  779. } else {
  780. uni.showToast({
  781. icon: "none",
  782. title: res.msg || "接口获取数据失败!",
  783. });
  784. }
  785. });
  786. },
  787. // 选中单选框
  788. radioChange1(item) {
  789. console.log(item);
  790. this.selectRadio = item.split("__");
  791. },
  792. // 确定
  793. ok1() {
  794. this.models1.disjunctor = false;
  795. if (!this.selectRadio.length) {
  796. //默认选中第一项,选中则是选中项
  797. this.selectRadio = [
  798. this.models1.radioItem[0].qrcode.split("__")[0],
  799. this.models1.radioItem[0].deptName,
  800. ];
  801. }
  802. uni.navigateTo({
  803. 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]}`,
  804. });
  805. },
  806. // 取消
  807. cancel1() {
  808. this.models1.disjunctor = false;
  809. },
  810. // 知道了
  811. showAlert(id) {
  812. uni.navigateTo({
  813. url: "../receiptpage/receiptpage"
  814. });
  815. },
  816. },
  817. onShow() {
  818. this.SMFlag = true;
  819. this.gotoFlag = true;
  820. },
  821. onLoad(options) {
  822. if (options.status == 200&&options.scanOrHand === 'hand'&&(options.type === "specimen"||options.type === "specimenPlan")) {
  823. this.hand_again();
  824. }
  825. console.log(options, "result");
  826. this.queryObj = options;
  827. this.isKs = this.queryObj.isKs;
  828. if (options.infoData && options.infoData != "undefined") {
  829. this.infoDATA = JSON.parse(options.infoData);
  830. } else if (options.model) {
  831. this.infoDATA = JSON.parse(options.model);
  832. }
  833. if (options.accountObj && options.accountObj != "undefined") {
  834. this.accountObj = JSON.parse(options.accountObj);
  835. }
  836. if (options.deptId && options.deptId != "undefined") {
  837. this.deptId = options.deptId;
  838. }
  839. if (options.handover && options.handover != "undefined") {
  840. this.handover = options.handover;
  841. }
  842. this.dataId = options.id;
  843. this.RESData = options.resData;
  844. this.res["status"] = options.status;
  845. this.res["msg"] = options.msg;
  846. console.log(options.patient);
  847. this.res["patient"] = options.patient;
  848. this.res["patientCode"] = options.patientCode;
  849. this.res["deptName"] = options.deptName;
  850. this.res["bedNum"] = options.bedNum;
  851. this.infoType = options.type1;
  852. if (options.dept) {
  853. this.DEPT = options.dept;
  854. }
  855. if (options.speNum) {
  856. this.speNum = options.speNum;
  857. }
  858. this.DEPTCode = options.deptCode;
  859. this.type = options.type;
  860. // #ifdef APP-PLUS
  861. webHandle("no", "app");
  862. // #endif
  863. // #ifdef H5
  864. webHandle("no", "wx");
  865. // #endif
  866. },
  867. };
  868. </script>
  869. <style lang="less">
  870. .Scanning_Result {
  871. padding: 0 20rpx;
  872. .Scanning_top {
  873. .Scanning_top_icon {
  874. width: 140rpx;
  875. height: 140rpx;
  876. margin: 0 auto;
  877. margin-top: 116rpx;
  878. border-radius: 50%;
  879. line-height: 140rpx;
  880. .speNum{
  881. text-align: center;
  882. font-size: 140rpx;
  883. }
  884. .cubeic-ok {
  885. font-size: 140rpx;
  886. color: #35b34a;
  887. }
  888. .cubeic-close {
  889. font-size: 140rpx;
  890. color: #ff3b53;
  891. }
  892. }
  893. .Scanning_top_text {
  894. .text1 {
  895. font-size: 48rpx;
  896. text-align: center;
  897. }
  898. .success_tips {
  899. color: red;
  900. font-size: 30rpx;
  901. }
  902. }
  903. }
  904. .Scanning_cont {
  905. font-size: 32rpx;
  906. text-align: center;
  907. view {
  908. margin-bottom: 16rpx;
  909. }
  910. .Scanning_cont_center {
  911. text-align: center;
  912. }
  913. .text {
  914. margin-top: 24rpx;
  915. color: #35b34a;
  916. }
  917. .text1 {
  918. margin-top: 24rpx;
  919. color: #ff3b53;
  920. }
  921. }
  922. .foot_btn {
  923. line-height: 88rpx;
  924. height: 100rpx;
  925. margin-top: 40rpx;
  926. display: flex;
  927. justify-content: center;
  928. .btn1,
  929. .btn2,
  930. .btn3 {
  931. height: 88rpx;
  932. flex: 1;
  933. margin: 0 1%;
  934. background-image: linear-gradient(to right, #72c172, #3bb197);
  935. color: #fff;
  936. border-radius: 8rpx;
  937. font-size: 32rpx;
  938. margin-top: 16rpx;
  939. text-align: center;
  940. }
  941. }
  942. .foot_btn_spe {
  943. line-height: 88rpx;
  944. height: 100rpx;
  945. margin-top: 40rpx;
  946. text-align: center;
  947. display: flex;
  948. justify-content: space-between;
  949. flex-wrap: wrap;
  950. &::after {
  951. content: '';
  952. flex: 1;
  953. }
  954. view {
  955. height: 88rpx;
  956. width: 48%;
  957. margin: 0 1%;
  958. background-image: linear-gradient(to right, #72c172, #3bb197);
  959. color: #fff;
  960. border-radius: 8rpx;
  961. font-size: 32rpx;
  962. margin-top: 16rpx;
  963. }
  964. }
  965. }
  966. </style>