scanning_Result.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. <template>
  2. <view class="Scanning_Result">
  3. <view class="Scanning_top" v-if="res.status == 200">
  4. <view class="Scanning_top_icon">
  5. <text class="cubeic-ok icon_transport transport-duigou"></text>
  6. </view>
  7. <view class="Scanning_top_text">
  8. <view class="text1"> 操作成功 </view>
  9. <view class="success_tips" v-if="type == 'inspect' || type == 'patientTransport'">
  10. (请您评估患者的意识状况、生命体征、配合程度,如有异常请及时联系护士!)
  11. </view>
  12. </view>
  13. </view>
  14. <view class="Scanning_top" v-if="res.status != 200">
  15. <view class="Scanning_top_icon">
  16. <text class="cubeic-close icon_transport transport-shibai"></text>
  17. </view>
  18. <view class="Scanning_top_text">
  19. <view class="text1"> 操作失败 </view>
  20. </view>
  21. </view>
  22. <view class="Scanning_cont" v-if="
  23. (res.status == 200 && type == 'specimenPlan') ||
  24. (res.status == 200 && type == 'specimen')
  25. ">
  26. <view> 标本类型 : {{ infoDATA.stype.name || "-" }} </view>
  27. <view> 标本编号 : {{ infoDATA.scode || "-" }} </view>
  28. <view> 患者姓名 : {{ infoDATA.patientName || "-" }} </view>
  29. <view> 已扫描 : {{ speNum }} </view>
  30. </view>
  31. <view class="Scanning_cont" v-if="
  32. (res.status == 200 && type == 'inspect') || type == 'patientTransport'
  33. ">
  34. <view v-if="res.patient"> 患者姓名 : {{ res.patient || "-" }} </view>
  35. <view v-if="res.patientCode">
  36. 患者编号 : {{ res.patientCode || "-" }}
  37. </view>
  38. <view v-if="res.deptName">
  39. 住院科室 : {{ res.deptName !== "undefined" ? res.deptName : "-" }}
  40. </view>
  41. <view v-if="res.bedNum">
  42. 床号 : {{ res.bedNum !== "undefined" ? res.bedNum : "-" }}
  43. </view>
  44. <view v-if="res.data">
  45. 检查项目 :
  46. <text v-for="(data, i) in res.data" :key="i">{{
  47. data.inspectName
  48. }}</text>
  49. </view>
  50. <view v-if="
  51. res.status == 200 &&
  52. infoType != 'ins-zxz-1' &&
  53. infoType != 'ins-dsd-1' &&
  54. infoType != 'ins-ddd-1' &&
  55. infoType != 'trans-ddd-1' &&
  56. infoType != 'trans-dsd-1'
  57. ">
  58. {{ res.msg || "" }}
  59. </view>
  60. <view v-if="infoType == 'trans-dsd-1' && res.status == 200">
  61. 工单已完成
  62. </view>
  63. <view v-if="infoType == 'ins-dsd-1' && res.status == 200">
  64. 工单已完成。
  65. </view>
  66. <!-- 半程陪检 -->
  67. <view v-if="infoDATA.type == 'ins-half-ok' && res.status == 200">
  68. 已到达检查科室,工单已完成。
  69. </view>
  70. </view>
  71. <view class="Scanning_cont" v-if="res.status == 200 && (type == 'drugsBag' || type == 'jPBag')">
  72. <view v-if="type == 'drugsBag'"> 药包编码 : #{{ infoDATA.packid }} </view>
  73. <view
  74. v-if="type == 'drugsBag' && accountObj && (queryObj.type1 === 'drug-ddd-2' || queryObj.type1 === 'drug-dsd-2')">
  75. 交接人账号 : {{ accountObj.account }} </view>
  76. <view
  77. v-if="type == 'drugsBag' && accountObj && (queryObj.type1 === 'drug-ddd-2' || queryObj.type1 === 'drug-dsd-2')">
  78. 交接人姓名 : {{ accountObj.accountName }} </view>
  79. <view v-if="type == 'jPBag'">
  80. 静配药包编码 : #{{ infoDATA.packid }}
  81. </view>
  82. <view> 所属科室 : {{ infoDATA.target.dept || "-" }} </view>
  83. <view v-if="infoType === 'drug-dsd-2' || infoType === 'jp-dsd-2'">
  84. 工单已完成。
  85. </view>
  86. <view class="red"> 如果您当前科室还有药包需要扫描,请点击“继续扫描”! </view>
  87. </view>
  88. <view class="Scanning_cont" v-if="res.status != 200">
  89. <view class="Scanning_cont_center">
  90. {{ res.msg === "undefined" || !res.msg ? "" : res.msg }}
  91. </view>
  92. </view>
  93. <view class="foot_btn" v-if="
  94. (type == 'specimen' && isKs != '1') ||
  95. (type == 'specimenPlan' && isKs != '1')
  96. ">
  97. <view class="btn1" @click="Scanning_again()"> 继续扫描 </view>
  98. <view class="btn3" @click="getNoScanSpecimen()">查看未扫描标本</view>
  99. <view class="btn2" @click="Scanning_complete(dataId)"> 完成扫描 </view>
  100. </view>
  101. <view class="foot_btn" v-if="
  102. (type != 'specimenPlan' &&
  103. type != 'specimen' &&
  104. type != 'drugsBag' &&
  105. type != 'jPBag' &&
  106. (type != 'inspect') & (type != 'patientTransport')) ||
  107. (queryObj.status == 200 &&
  108. type == 'drugsBag' &&
  109. infoType == 'drug-ddd-2') ||
  110. (queryObj.status == 200 &&
  111. type == 'drugsBag' &&
  112. infoType == 'drug-dsd-2') ||
  113. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-ddd-2') ||
  114. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-dsd-2') ||
  115. (queryObj.status == 200 && type == 'inspect') ||
  116. (queryObj.status == 200 && type == 'patientTransport')
  117. ">
  118. <view class="btn3" @click="Scanning_again()" v-if="type == 'drugsBag'||type == 'jPBag'"> 继续扫描 </view>
  119. <view class="btn3" @click="showAlert(dataId)"> 知道了 </view>
  120. </view>
  121. <view class="foot_btn" v-if="
  122. (isKs != '1' &&
  123. queryObj.status != 200 &&
  124. type == 'drugsBag' &&
  125. infoType == 'drug-ddd-2') ||
  126. (isKs != '1' &&
  127. queryObj.status != 200 &&
  128. type == 'drugsBag' &&
  129. infoType == 'drug-dsd-2') ||
  130. (isKs != '1' &&
  131. queryObj.status != 200 &&
  132. type == 'jPBag' &&
  133. infoType == 'jp-ddd-2') ||
  134. (isKs != '1' &&
  135. queryObj.status != 200 &&
  136. type == 'jPBag' &&
  137. infoType == 'jp-dsd-2') ||
  138. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  139. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  140. ">
  141. <view class="btn3" @click="Scanning_again()"> 继续扫描 </view>
  142. <view class="btn3" @click="showAlert()" v-if="type == 'drugsBag'"> 知道了 </view>
  143. <view class="btn3" @click="photograph(queryObj, { DEPTCode, DEPT, infoType })" v-if="
  144. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  145. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  146. ">
  147. 拍照
  148. </view>
  149. </view>
  150. <view class="foot_btn" v-if="
  151. infoType == 'spe-ddd-1' ||
  152. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-2') ||
  153. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-1') ||
  154. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-ddd-2') ||
  155. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-3') ||
  156. (isKs == '1' &&
  157. queryObj.status != 200 &&
  158. infoType == 'plan-spe-ddd-1') ||
  159. (isKs == '1' &&
  160. queryObj.status != 200 &&
  161. infoType == 'plan-spe-ddd-2') ||
  162. (isKs == '1' &&
  163. queryObj.status != 200 &&
  164. infoType == 'plan-spe-dsd-1') ||
  165. (isKs == '1' &&
  166. queryObj.status != 200 &&
  167. infoType == 'plan-spe-dsd-2') ||
  168. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-2') ||
  169. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-2') ||
  170. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-2') ||
  171. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-2') ||
  172. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-1') ||
  173. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-1') ||
  174. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-1') ||
  175. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-1') ||
  176. (isKs == '1' &&
  177. queryObj.status != 200 &&
  178. infoType == 'plan-spe-dsd-3') ||
  179. (isKs == '1' &&
  180. queryObj.status != 200 &&
  181. type == 'inspect' &&
  182. queryObj.type1 === 'undefined') ||
  183. (isKs == '1' &&
  184. queryObj.status != 200 &&
  185. type == 'patientTransport' &&
  186. queryObj.type1 === 'undefined')
  187. ">
  188. <view class="btn3" @click="showAlert(dataId)"> 知道了 </view>
  189. </view>
  190. <view class="foot_btn" v-if="
  191. (isKs == '1' &&
  192. queryObj.status != 200 &&
  193. type == 'inspect' &&
  194. queryObj.type1 === 'ins-zxz-1') ||
  195. (isKs == '1' &&
  196. queryObj.status != 200 &&
  197. type == 'inspect' &&
  198. queryObj.type1 === 'ins-dsd-1') ||
  199. (isKs == '1' &&
  200. queryObj.status != 200 &&
  201. type == 'patientTransport' &&
  202. queryObj.type1 === 'trans-dsd-1')
  203. ">
  204. <view class="btn1" @click="showAlert(dataId)"> 知道了 </view>
  205. <view class="btn2" @click="goToRight(dataId)"> 继续执行工单 </view>
  206. </view>
  207. <!-- 弹窗 -->
  208. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  209. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  210. <!-- 弹窗 -->
  211. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  212. :radioItem="models1.radioItem" @ok="ok1" @radioChange="radioChange1" @cancel="cancel1" :operate="models1.operate">
  213. </showModel>
  214. <!-- 弹窗 -->
  215. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  216. @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate">
  217. </showModel>
  218. </view>
  219. </template>
  220. <script>
  221. import showModel from "../../components/showModel/showModel.vue";
  222. import {
  223. get,
  224. post,
  225. SM,
  226. webHandle
  227. } from "../../http/http.js";
  228. import {
  229. photographTool
  230. } from "../../tools/photograph.js";
  231. export default {
  232. data() {
  233. return {
  234. deptId:undefined,
  235. handover:undefined,
  236. SMFlag: true,
  237. // 交接人信息
  238. accountObj: undefined,
  239. // 完成扫描的id
  240. wcId: "",
  241. wcFlag: false,
  242. // 弹窗model
  243. models: {
  244. disjunctor: false,
  245. },
  246. // 单选框弹窗model1
  247. models1: {
  248. disjunctor: false,
  249. },
  250. // 完成扫描弹窗model1
  251. models2: {
  252. disjunctor: false,
  253. },
  254. isKs: "", //是否科室签到 1
  255. infoDATA: {},
  256. res: {},
  257. infoType: "",
  258. DEPTCode: "",
  259. RESData: {},
  260. DEPT: "",
  261. dataId: "",
  262. type: "",
  263. model: {},
  264. speNum: 0,
  265. queryObj: {}, //路由传递过来的数据
  266. selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
  267. gotoFlag: true,
  268. content:"",
  269. };
  270. },
  271. methods: {
  272. // 查看未扫描标本
  273. getNoScanSpecimen() {
  274. if (!this.gotoFlag) {
  275. return;
  276. }
  277. this.gotoFlag = false;
  278. uni.navigateTo({
  279. url: `../noScanSpecimen/noScanSpecimen?workOrderId=${encodeURIComponent(JSON.stringify([this.queryObj.id]))}&deptCode=${this.queryObj.deptCode}`,
  280. });
  281. },
  282. // 拍照
  283. photograph(data, obj) {
  284. photographTool(data, obj);
  285. },
  286. // 继续扫描
  287. Scanning_again() {
  288. if (!this.SMFlag) {
  289. return;
  290. }
  291. this.SMFlag = false;
  292. SM().then((ress1) => {
  293. // ----------------
  294. uni.showLoading({
  295. title: "加载中",
  296. mask: true,
  297. });
  298. //检验二维码的有效性
  299. post("/dept/scanning", {
  300. content: ress1,
  301. }).then((result) => {
  302. this.SMFlag = true;
  303. if (result.state == 200 || result.state == 201) {
  304. let codes = result.code;
  305. if (codes) {
  306. let speCode = codes;
  307. let data = {
  308. code: speCode,
  309. type: this.queryObj.type1,
  310. deptCode: this.DEPTCode,
  311. ids: [],
  312. };
  313. data.ids.push(this.dataId);
  314. let postType = "";
  315. if (this.type == "jPBag" || this.type == "drugsBag") {
  316. postType = "handleDrugsAndJp";
  317. delete data.ids;
  318. data.deptId = this.deptId;
  319. data.handover = this.handover;
  320. }
  321. if (this.type == "specimen") {
  322. data["speCode"] = data.code;
  323. delete data.code;
  324. postType = "handleSpes";
  325. }
  326. if (this.type == "specimenPlan") {
  327. data["speCode"] = data.code;
  328. delete data.code;
  329. postType = "handlePlanSpes";
  330. }
  331. if (this.type == "inspect") {
  332. postType = "handleIns";
  333. }
  334. if (this.type == "patientTransport") {
  335. postType = "handleTrans";
  336. }
  337. post("/workerOrder/" + postType, data).then((ress) => {
  338. uni.hideLoading();
  339. if (ress.status == 200) {
  340. if (this.type == "specimenPlan" || this.type == "specimen") {
  341. this.infoDATA = ress.data;
  342. this.speNum = ress.specimenCount;
  343. uni.redirectTo({
  344. url: `../scanning_Result/scanning_Result?type=${
  345. this.queryObj.type
  346. }&type1=${
  347. this.queryObj.type1
  348. }&infoData=${encodeURIComponent(
  349. JSON.stringify(ress.data)
  350. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  351. this.queryObj.deptCode
  352. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}`,
  353. });
  354. } else if (
  355. this.type == "inspect" ||
  356. this.type == "patientTransport"
  357. ) {
  358. uni.redirectTo({
  359. url: `../scanning_Result/scanning_Result?type=${
  360. this.queryObj.type //baba
  361. }&type1=${
  362. this.queryObj.type1
  363. }&infoData=${encodeURIComponent(
  364. JSON.stringify(ress.data)
  365. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  366. this.queryObj.deptCode
  367. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  368. JSON.stringify(ress)
  369. )}&patient=${ress.patient}&patientCode=${
  370. ress.patientCode
  371. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  372. });
  373. } else {
  374. uni.redirectTo({
  375. url: `../scanning_Result/scanning_Result?type=${
  376. this.queryObj.type
  377. }&type1=${
  378. this.queryObj.type1
  379. }&infoData=${encodeURIComponent(
  380. JSON.stringify(ress.data)
  381. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  382. this.queryObj.deptCode
  383. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  384. });
  385. }
  386. } else {
  387. uni.redirectTo({
  388. url: `../scanning_Result/scanning_Result?type=${
  389. this.queryObj.type
  390. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  391. ress.msg
  392. }&deptCode=${this.queryObj.deptCode}&dept=${
  393. this.queryObj.dept
  394. }&id=${this.dataId}&model=${encodeURIComponent(
  395. JSON.stringify(this.infoDATA)
  396. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  397. });
  398. }
  399. });
  400. } else {
  401. uni.hideLoading();
  402. }
  403. } else {
  404. uni.hideLoading();
  405. uni.showToast({
  406. icon: "none",
  407. title: "请求失败!",
  408. });
  409. }
  410. });
  411. // ------------------------------
  412. }).catch(err => {
  413. this.SMFlag = true;
  414. });
  415. },
  416. // 正常完成扫描
  417. overFinish() {
  418. let data = {
  419. type: this.queryObj.type1,
  420. ids: [this.wcId],
  421. };
  422. //只要是标本轮巡1对多或者多对多
  423. // plan-spe-dsd-2 1对多
  424. // plan-spe-dsd-3 多对多
  425. if (
  426. this.queryObj.type1 === "plan-spe-ddd-2" ||
  427. this.queryObj.type1 === "plan-spe-dsd-2" ||
  428. this.queryObj.type1 === "plan-spe-dsd-3"
  429. ) {
  430. post("/workerOrder/finishPlanSpes", data).then((res) => {
  431. // uni.hideLoading()
  432. if (res.status == 200) {
  433. this.models2 = {
  434. disjunctor: true,
  435. title: "提示",
  436. content: `完成扫描成功`,
  437. icon: "success",
  438. operate: {
  439. know: "知道了",
  440. },
  441. };
  442. } else {
  443. uni.showToast({
  444. icon: "none",
  445. title: "请求失败!",
  446. });
  447. }
  448. });
  449. } else {
  450. post("/workerOrder/finishSpes", data).then((res) => {
  451. // uni.hideLoading()
  452. if (res.status == 200) {
  453. uni.navigateTo({
  454. url: "../receiptpage/receiptpage",
  455. });
  456. } else {
  457. uni.showToast({
  458. icon: "none",
  459. title: "请求失败!",
  460. });
  461. }
  462. });
  463. }
  464. },
  465. // 确定
  466. ok() {
  467. this.models.disjunctor = false;
  468. let postData = {
  469. ids: [this.queryObj.id],
  470. sign: true,
  471. deptQrCode: this.queryObj.deptCode
  472. };
  473. uni.showLoading({
  474. title: '加载中',
  475. mask: true
  476. });
  477. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  478. uni.hideLoading();
  479. if (ress.status == 200) {
  480. if (this.wcFlag) {
  481. //正常完成扫描
  482. this.overFinish()
  483. } else {
  484. this.gotoOver();
  485. }
  486. } else if (ress.status == 1000035) {
  487. let content = '';
  488. if (this.queryObj.type1 === 'spe-ddd-2' || this.queryObj.type1 === 'plan-spe-ddd-2') {
  489. //待到达
  490. content =
  491. `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
  492. } else {
  493. //待送达
  494. this.content =
  495. `本工单已签到<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>只未签收,您确定完成工单吗?`;
  496. content = `您在<strong class="red">${ress.deptName}</strong>检验科扫描了<strong class="red">${ress.deptScanNum}</strong>个标本,还需扫描<strong class="red">${ress.deptNotScanNum}</strong>标本。`;
  497. }
  498. this.models2 = {
  499. disjunctor: true,
  500. title: "提示",
  501. content,
  502. icon: "warn",
  503. operate: {
  504. ok: "确定",
  505. cancel: "取消",
  506. },
  507. };
  508. } else {
  509. uni.showToast({
  510. icon: "none",
  511. title: "请求失败!",
  512. });
  513. }
  514. })
  515. },
  516. // 取消
  517. cancel() {
  518. this.models.disjunctor = false;
  519. },
  520. // 确定
  521. ok2() {
  522. this.models2.disjunctor = false;
  523. let postData = {
  524. ids: [this.queryObj.id],
  525. deptQrCode: this.queryObj.deptCode
  526. };
  527. uni.showLoading({
  528. title: '加载中',
  529. mask: true
  530. });
  531. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  532. uni.hideLoading();
  533. if (ress.status == 200) {
  534. if (this.wcFlag) {
  535. this.overFinish()
  536. } else {
  537. this.gotoOver();
  538. }
  539. } else {
  540. uni.showToast({
  541. icon: "none",
  542. title: "请求失败!",
  543. });
  544. }
  545. })
  546. },
  547. // 取消
  548. cancel2() {
  549. this.models2.disjunctor = false;
  550. },
  551. know2() {
  552. this.models2.disjunctor = false;
  553. uni.navigateTo({
  554. url: "../receiptpage/receiptpage",
  555. });
  556. },
  557. // 完成扫描
  558. Scanning_complete(id) {
  559. this.wcId = id;
  560. if (
  561. this.queryObj.type1 == "plan-spe-ddd-2" ||
  562. this.queryObj.type1 == "spe-ddd-2"
  563. ) {
  564. this.wcFlag = true;
  565. this.models = {
  566. disjunctor: true,
  567. title: "提示",
  568. content: "是否确定标本已扫描完成?",
  569. icon: "warn",
  570. operate: {
  571. ok: "确定",
  572. cancel: "取消",
  573. },
  574. };
  575. } else if (
  576. this.queryObj.type1 == "plan-spe-dsd-2" ||
  577. this.queryObj.type1 == "plan-spe-dsd-3" ||
  578. this.queryObj.type1 == "spe-dsd-2" ||
  579. this.queryObj.type1 == "spe-dsd-3"
  580. ) {
  581. this.wcFlag = false;
  582. this.models = {
  583. disjunctor: true,
  584. title: "提示",
  585. content: "是否确定标本已扫描完成?",
  586. icon: "warn",
  587. operate: {
  588. ok: "确定",
  589. cancel: "取消",
  590. },
  591. };
  592. } else {
  593. this.gotoOver();
  594. }
  595. },
  596. // 跳转完成工单页面
  597. gotoOver() {
  598. uni.navigateTo({
  599. url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
  600. this.queryObj.type1
  601. }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
  602. this.queryObj.deptCode
  603. }&dept=${this.queryObj.dept}&speNum=${this.speNum}&content=${this.content}`,
  604. });
  605. },
  606. // 继续执行工单,当扫错科室码的时候,直接跳过,默默执行正确的科室码
  607. goToRight(id) {
  608. // flag 为1时查检查科室,flag为2时查终点科室
  609. let flag;
  610. // 患者转科,患者陪检
  611. if (
  612. this.queryObj.type1 == "trans-dsd-1" ||
  613. this.queryObj.type1 == "ins-dsd-1"
  614. ) {
  615. flag = 2;
  616. }
  617. if (this.queryObj.type1 == "ins-zxz-1") {
  618. flag = 1;
  619. }
  620. let postData = {
  621. workOrderId: id,
  622. flag: flag,
  623. };
  624. uni.showLoading({
  625. title: "加载中",
  626. mask: true,
  627. });
  628. post("/workerOrder/continueWorkOrder", postData).then((res) => {
  629. uni.hideLoading();
  630. console.log(res);
  631. if (res.state == 200) {
  632. let radioItem = [];
  633. res.data.forEach((item) => {
  634. let flag = radioItem.every(
  635. (item1) => item1.qrcode !== item.qrcode + "__" + item.deptName
  636. ); //如果radioItem里的所有项都与之不重复
  637. if (flag) {
  638. radioItem.push({
  639. qrcode: item.qrcode + "__" + item.deptName,
  640. deptName: item.deptName,
  641. });
  642. }
  643. });
  644. this.models1 = {
  645. disjunctor: true,
  646. title: "请选择正确的科室",
  647. radioItem,
  648. icon: "",
  649. operate: {
  650. ok: "确定",
  651. cancel: "取消",
  652. },
  653. };
  654. } else {
  655. uni.showToast({
  656. icon: "none",
  657. title: "请求失败!",
  658. });
  659. }
  660. });
  661. },
  662. // 选中单选框
  663. radioChange1(item) {
  664. console.log(item);
  665. this.selectRadio = item.split("__");
  666. },
  667. // 确定
  668. ok1() {
  669. this.models1.disjunctor = false;
  670. if (!this.selectRadio.length) {
  671. //默认选中第一项,选中则是选中项
  672. this.selectRadio = [
  673. this.models1.radioItem[0].qrcode.split("__")[0],
  674. this.models1.radioItem[0].deptName,
  675. ];
  676. }
  677. uni.navigateTo({
  678. 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]}`,
  679. });
  680. },
  681. // 取消
  682. cancel1() {
  683. this.models1.disjunctor = false;
  684. },
  685. // 知道了
  686. showAlert(id) {
  687. uni.navigateTo({
  688. url: "../receiptpage/receiptpage"
  689. });
  690. },
  691. },
  692. onShow() {
  693. this.SMFlag = true;
  694. this.gotoFlag = true;
  695. },
  696. onLoad(options) {
  697. console.log(options, "result");
  698. this.queryObj = options;
  699. this.isKs = this.queryObj.isKs;
  700. if (options.infoData && options.infoData != "undefined") {
  701. this.infoDATA = JSON.parse(options.infoData);
  702. } else if (options.model) {
  703. this.infoDATA = JSON.parse(options.model);
  704. }
  705. if (options.accountObj && options.accountObj != "undefined") {
  706. this.accountObj = JSON.parse(options.accountObj);
  707. }
  708. if (options.deptId && options.deptId != "undefined") {
  709. this.deptId = options.deptId;
  710. }
  711. if (options.handover && options.handover != "undefined") {
  712. this.handover = options.handover;
  713. }
  714. this.dataId = options.id;
  715. this.RESData = options.resData;
  716. this.res["status"] = options.status;
  717. this.res["msg"] = options.msg;
  718. console.log(options.patient);
  719. this.res["patient"] = options.patient;
  720. this.res["patientCode"] = options.patientCode;
  721. this.res["deptName"] = options.deptName;
  722. this.res["bedNum"] = options.bedNum;
  723. this.infoType = options.type1;
  724. if (options.dept) {
  725. this.DEPT = options.dept;
  726. }
  727. if (options.speNum) {
  728. this.speNum = options.speNum;
  729. }
  730. this.DEPTCode = options.deptCode;
  731. this.type = options.type;
  732. // #ifdef APP-PLUS
  733. webHandle("no", "app");
  734. // #endif
  735. // #ifdef H5
  736. webHandle("no", "wx");
  737. // #endif
  738. },
  739. };
  740. </script>
  741. <style lang="less">
  742. .Scanning_Result {
  743. padding: 0 20rpx;
  744. .Scanning_top {
  745. .Scanning_top_icon {
  746. width: 140rpx;
  747. height: 140rpx;
  748. margin: 0 auto;
  749. margin-top: 116rpx;
  750. border-radius: 50%;
  751. line-height: 140rpx;
  752. .cubeic-ok {
  753. font-size: 140rpx;
  754. color: #35b34a;
  755. }
  756. .cubeic-close {
  757. font-size: 140rpx;
  758. color: #ff3b53;
  759. }
  760. }
  761. .Scanning_top_text {
  762. .text1 {
  763. margin-top: 40rpx;
  764. font-size: 48rpx;
  765. text-align: center;
  766. }
  767. .success_tips {
  768. color: red;
  769. font-size: 30rpx;
  770. }
  771. }
  772. }
  773. .Scanning_cont {
  774. font-size: 32rpx;
  775. text-align: center;
  776. view {
  777. margin-bottom: 16rpx;
  778. }
  779. .Scanning_cont_center {
  780. text-align: center;
  781. }
  782. .text {
  783. margin-top: 24rpx;
  784. color: #35b34a;
  785. }
  786. .text1 {
  787. margin-top: 24rpx;
  788. color: #ff3b53;
  789. }
  790. }
  791. .foot_btn {
  792. line-height: 88rpx;
  793. height: 100rpx;
  794. margin-top: 40rpx;
  795. display: flex;
  796. justify-content: center;
  797. .btn1,
  798. .btn2,
  799. .btn3 {
  800. height: 88rpx;
  801. flex: 1;
  802. margin: 0 1%;
  803. background-image: linear-gradient(to right, #72c172, #3bb197);
  804. color: #fff;
  805. border-radius: 8rpx;
  806. font-size: 32rpx;
  807. margin-top: 16rpx;
  808. text-align: center;
  809. }
  810. }
  811. }
  812. </style>