scanning_Result.vue 30 KB

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