scanning_Result.vue 30 KB

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