scanning_Result.vue 30 KB

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