scanning_djEnd.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842
  1. <template>
  2. <view class="Scanning_djEnd">
  3. <view class="Scanning_top" v-if="infoDATA.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>
  10. </view>
  11. <view class="Scanning_top" v-if="
  12. infoDATA.status == 10005 ||
  13. infoDATA.status == 100018 ||
  14. infoDATA.status == 10004 ||
  15. infoDATA.status == 100021 ||
  16. infoDATA.status == 500 ||
  17. infoDATA.status == 100031
  18. ">
  19. <view class="Scanning_top_icon">
  20. <text class="cubeic-close icon_transport transport-shibai"></text>
  21. </view>
  22. <view class="Scanning_top_text">
  23. <view class="text1">操作失败</view>
  24. <view class="text1 f30" v-if="queryObj.qrcode !== undefined">扫描内容:{{queryObj.qrcode}}</view>
  25. </view>
  26. </view>
  27. <view class="Scanning_cont" v-if="
  28. (infoDATA.status == 200 && type == 'specimenPlan') ||
  29. (infoDATA.status == 200 && type == 'specimen')
  30. "></view>
  31. <view class="Scanning_cont" v-if="
  32. (infoDATA.status == 200 && type == 'patientTransport') ||
  33. (infoDATA.status == 200 && type == 'inspect')
  34. ">扫描患者腕带并将患者送往目标科室.</view>
  35. <view class="Scanning_cont" v-if="
  36. (infoDATA.status == 200 &&
  37. type == 'drugsBag' &&
  38. (type1 == 'drug-ddd-2' || type1 == 'drug-dsd-2')) ||
  39. (infoDATA.status == 200 &&
  40. type == 'jPBag' &&
  41. (type1 == 'jp-ddd-2' || type1 == 'jp-dsd-2'))
  42. ">已到达目标科室,请扫描药包或静配包.</view>
  43. <view class="Scanning_cont" v-if="
  44. (infoDATA.status == 200 &&
  45. type == 'drugsBag' &&
  46. (type1 == 'drug-ddd-1' || type1 == 'drug-dsd-1')) ||
  47. (infoDATA.status == 200 &&
  48. type == 'jPBag' &&
  49. (type1 == 'jp-ddd-1' || type1 == 'jp-dsd-1'))
  50. ">
  51. <view v-if="accountObj"> 交接人账号 : {{ accountObj.account }} </view>
  52. <view v-if="accountObj"> 交接人姓名 : {{ accountObj.accountName }} </view>
  53. <view>已到达目标科室,请取药包或静配包后送达目标科室.</view>
  54. </view>
  55. <view class="Scanning_cont" v-if="
  56. infoDATA.status == 200 && type == 'other' && infoDATA.type == 'qt-ddd-1'
  57. ">已到达目标科室,请执行该工单.</view>
  58. <view class="Scanning_cont" v-if="
  59. (infoDATA.state == 'finish' &&
  60. infoDATA.status == 200 &&
  61. type == 'specimenPlan' &&
  62. infoDATA.type == 'plan-spe-dsd-1') ||
  63. (infoDATA.status == 200 &&
  64. type == 'other' &&
  65. infoDATA.type == 'qt-dsd-1')
  66. ">已到达目标科室,工单已完成.</view>
  67. <view class="Scanning_cont" v-if="
  68. (infoDATA.status == 200 &&
  69. type == 'specimenPlan' &&
  70. infoDATA.type != 'plan-spe-ddd-1' &&
  71. infoDATA.type != 'plan-spe-dsd-1') ||
  72. (infoDATA.status == 200 &&
  73. type == 'specimen' &&
  74. infoDATA.type != 'spe-ddd-1' &&
  75. infoDATA.type != 'spe-dsd-1')
  76. ">已到达目标科室,请扫描标本.</view>
  77. <view class="Scanning_cont" v-if="
  78. (infoDATA.status == 200 &&
  79. type == 'specimenPlan' &&
  80. infoDATA.type == 'plan-spe-ddd-1') ||
  81. (infoDATA.status == 200 &&
  82. type == 'specimen' &&
  83. infoDATA.type == 'spe-ddd-1')
  84. ">
  85. <view v-if="accountObj"> 交接人账号 : {{ accountObj.account }} </view>
  86. <view v-if="accountObj"> 交接人姓名 : {{ accountObj.accountName }} </view>
  87. <view>已到达目标科室,请取标本后送达目标科室.</view>
  88. </view>
  89. <view class="Scanning_cont" v-if="
  90. (infoDATA.state != 'finish' &&
  91. infoDATA.status == 200 &&
  92. type == 'specimenPlan' &&
  93. infoDATA.type == 'plan-spe-dsd-1') ||
  94. (infoDATA.status == 200 &&
  95. type == 'specimen' &&
  96. infoDATA.type == 'spe-dsd-1')
  97. ">
  98. <view v-if="accountObj"> 交接人账号 : {{ accountObj.account }} </view>
  99. <view v-if="accountObj"> 交接人姓名 : {{ accountObj.accountName }} </view>
  100. <view>已到达目标科室,请放置标本完成该工单.</view>
  101. </view>
  102. <view class="Scanning_cont" v-if="infoDATA.status != 200">
  103. <view>{{ infoDATA.msg }}</view>
  104. </view>
  105. <view class="foot_btn" v-if="type == 'inspect' || type == 'patientTransport'">
  106. <view class="btn3" @click="Scanning_again()">继续扫描</view>
  107. </view>
  108. <view class="foot_btn" v-if="type == 'drugsBag' || type == 'jPBag'">
  109. <view class="btn3" @click="Scanning_again()" v-if="
  110. type1 === 'drug-ddd-2' ||
  111. type1 === 'drug-dsd-2' ||
  112. type1 === 'jp-ddd-2' ||
  113. type1 === 'jp-dsd-2'
  114. ">继续扫描</view>
  115. <view class="btn3" @click="showHandViewDrugsbag()" v-if="
  116. type1 === 'drug-ddd-2' ||
  117. type1 === 'drug-dsd-2' ||
  118. type1 === 'jp-ddd-2' ||
  119. type1 === 'jp-dsd-2'
  120. ">手动录入</view>
  121. <view class="btn3" @click="showAlert()" v-if="
  122. type1 === 'drug-ddd-1' ||
  123. type1 === 'drug-dsd-1' ||
  124. type1 === 'jp-ddd-1' ||
  125. type1 === 'jp-dsd-1'
  126. ">知道了</view>
  127. </view>
  128. <view class="foot_btn_spe" v-if="
  129. (type == 'specimenPlan' &&
  130. type1 != 'plan-spe-dsd-1' &&
  131. (type1 != 'plan-spe-ddd-1') & (type1 != 'plan-spe-ddd-2')) ||
  132. (type == 'specimen' &&
  133. type1 != 'spe-dsd-1' &&
  134. (type1 != 'spe-ddd-1') & (type1 != 'spe-ddd-2'))
  135. ">
  136. <view class="btn1" @click="Scanning_again()">扫描标本</view>
  137. <view class="btn3" @click="showHandViewSpecimen()">手动录入</view>
  138. <view class="btn3" @click="getNoScanSpecimen()">未扫描标本</view>
  139. <view class="btn2" @click="Scanning_complete(ids)">完成扫描</view>
  140. <view class="btn2" @click="checkNumber()" v-if="queryObj.isDigitalHandover==1">数量核对</view>
  141. </view>
  142. <view class="foot_btn_spe" v-if="
  143. (type == 'specimenPlan' && type1 == 'plan-spe-ddd-2') ||
  144. (type == 'specimen' && type1 == 'spe-ddd-2')
  145. ">
  146. <view class="btn1" @click="Scanning_again()">扫描标本</view>
  147. <view class="btn3" @click="showHandViewSpecimen()">手动录入</view>
  148. <view class="btn3" @click="getNoScanSpecimen()">未扫描标本</view>
  149. <view class="btn2" @click="Scanning_complete(ids)">完成扫描</view>
  150. <view class="btn2" @click="checkNumber()" v-if="queryObj.isDigitalHandover==1">数量核对</view>
  151. </view>
  152. <view class="foot_btn" v-if="
  153. (infoDATA.state != 'finish' &&
  154. type == 'specimenPlan' &&
  155. type1 == 'plan-spe-dsd-1') ||
  156. (type == 'specimen' && type1 == 'spe-dsd-1')
  157. ">
  158. <view class="btn1" @click="Scanning_complete1(ids)">完成工单</view>
  159. <view class="btn2" @click="showAlert()">继续配送</view>
  160. </view>
  161. <view class="foot_btn" v-if="
  162. infoDATA.status != 200 &&
  163. type != 'specimenPlan' &&
  164. type != 'specimen' &&
  165. type !== 'jPBag' &&
  166. type !== 'inspect' &&
  167. type !== 'drugsBag' &&
  168. type !== 'patientTransport'
  169. ">
  170. <view class="btn3" @click="showAlert()">知道了</view>
  171. </view>
  172. <view class="foot_btn" v-if="
  173. (infoDATA.status == 200 && type1 == 'spe-ddd-1') ||
  174. (infoDATA.status == 200 && type1 == 'plan-spe-ddd-1')
  175. ">
  176. <view class="btn3" @click="showAlert()">知道了</view>
  177. </view>
  178. <view class="foot_btn" v-if="
  179. (infoDATA.state == 'finish' &&
  180. infoDATA.status == 200 &&
  181. type == 'specimenPlan' &&
  182. type1 == 'plan-spe-dsd-1') ||
  183. (infoDATA.status == 200 && type == 'other')
  184. ">
  185. <view class="btn3" @click="showAlert()">知道了</view>
  186. </view>
  187. <!-- 弹窗 -->
  188. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  189. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  190. <!-- 弹窗 -->
  191. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  192. @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate">
  193. </showModel>
  194. <!-- 手动查询标本弹窗 -->
  195. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  196. @ok="speOk" @cancel="speCancel">
  197. </handViewSpecimen>
  198. <!-- 手动查询药品弹窗 -->
  199. <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
  200. :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
  201. </handViewDrugsBag>
  202. </view>
  203. </template>
  204. <script>
  205. import showModel from "../../components/showModel/showModel.vue";
  206. import {
  207. get,
  208. post,
  209. SM,
  210. webHandle
  211. } from "../../http/http.js";
  212. export default {
  213. data() {
  214. return {
  215. currentCode: '', //当前小扫描的科室二维码
  216. // 手动查询标本弹窗model
  217. speModels: {
  218. disjunctor: false,
  219. },
  220. // 手动查询药品弹窗model
  221. drugbagModels: {
  222. disjunctor: false,
  223. },
  224. // 交接人信息
  225. accountObj: undefined,
  226. //传给后端查询是否继续扫描
  227. deptId: undefined,
  228. SMFlag: true,
  229. // 弹窗model
  230. models: {
  231. disjunctor: false,
  232. },
  233. // 完成扫描弹窗model1
  234. models2: {
  235. disjunctor: false,
  236. },
  237. wcId: "", //工单完成ID
  238. wcFlag: false,
  239. modelFlag: "", //工单完成类型
  240. infoDATA: [],
  241. ids: [],
  242. type: "",
  243. type1: "",
  244. queryObj: {}, //路由传递过来的参数
  245. gotoFlag: true,
  246. speNum: 0,
  247. content: "",
  248. };
  249. },
  250. methods: {
  251. // 数量核对 queryObj
  252. checkNumber() {
  253. uni.navigateTo({
  254. url: `/pages/specimenCheckingDetail/specimenCheckingDetail?infoDATA=${encodeURIComponent(JSON.stringify({startDept:this.queryObj.startDeptId,uuid:this.queryObj.gdId}))}&id=${this.queryObj.signDeptId}&t=big&gdState=${this.queryObj.gdState}`
  255. })
  256. },
  257. // 手动查询药品-确认
  258. drugbagOk(data) {
  259. console.log(data);
  260. if (!data.id) {
  261. //没有查询到药品
  262. uni.showModal({
  263. title: '提示',
  264. content: "没有查询到发药单号!",
  265. showCancel: false,
  266. success: function(res) {
  267. if (res.confirm) {
  268. console.log('用户点击确定');
  269. } else if (res.cancel) {
  270. console.log('用户点击取消');
  271. }
  272. }
  273. });
  274. return;
  275. }
  276. this.drugbagModels.disjunctor = false;
  277. this.hand_scanning_common(data.packid, 'hand');
  278. },
  279. // 手动查询药品-取消
  280. drugbagCancel() {
  281. this.drugbagModels.disjunctor = false;
  282. },
  283. // 手动查询药品弹窗
  284. showHandViewDrugsbag() {
  285. this.drugbagModels = {
  286. title: '填写发药单号',
  287. disjunctor: true,
  288. }
  289. },
  290. // 手动查询标本-确认
  291. speOk(data) {
  292. console.log(data);
  293. if (!data.id) {
  294. //没有查询到标本
  295. uni.showModal({
  296. title: '提示',
  297. content: "没有查询到标本!",
  298. showCancel: false,
  299. success: function(res) {
  300. if (res.confirm) {
  301. console.log('用户点击确定');
  302. } else if (res.cancel) {
  303. console.log('用户点击取消');
  304. }
  305. }
  306. });
  307. return;
  308. }
  309. this.speModels.disjunctor = false;
  310. this.hand_scanning_common(data.scode, 'hand');
  311. },
  312. // 手动查询标本-取消
  313. speCancel() {
  314. this.speModels.disjunctor = false;
  315. },
  316. // 手动查询标本弹窗
  317. showHandViewSpecimen() {
  318. this.speModels = {
  319. title: '填写标本编码',
  320. disjunctor: true,
  321. }
  322. },
  323. // 手动输入标本和扫码公共方法
  324. hand_scanning_common(ress1, type) {
  325. uni.showLoading({
  326. title: "加载中",
  327. mask: true,
  328. });
  329. // ----------------
  330. //检验二维码的有效性
  331. post("/dept/scanning", {
  332. content: ress1,
  333. }).then((result) => {
  334. this.SMFlag = true;
  335. if (result.state == 200 || result.state == 201) {
  336. this.currentCode = result.code;
  337. let ress = result.code;
  338. let speCode = ress;
  339. let data = {
  340. code: speCode,
  341. type: this.queryObj.type1,
  342. deptCode: this.code,
  343. ids: this.ids,
  344. };
  345. let postType = "";
  346. if (this.type == "jPBag" || this.type == "drugsBag") {
  347. postType = "handleDrugsAndJp";
  348. delete data.ids;
  349. if (this.accountObj) {
  350. data.handover = this.accountObj.accountId;
  351. }
  352. data.deptId = this.deptId;
  353. }
  354. if (this.type == "specimen") {
  355. postType = "handleSpes";
  356. data["speCode"] = data.code;
  357. delete data.code;
  358. if (this.accountObj) {
  359. data.handover = this.accountObj.accountId;
  360. }
  361. }
  362. if (this.type == "specimenPlan") {
  363. postType = "handlePlanSpes";
  364. data["speCode"] = data.code;
  365. delete data.code;
  366. if (this.accountObj) {
  367. data.handover = this.accountObj.accountId;
  368. }
  369. }
  370. if (this.type == "inspect") {
  371. postType = "handleIns";
  372. }
  373. if (this.type == "patientTransport") {
  374. postType = "handleTrans";
  375. }
  376. post("/workerOrder/" + postType, data).then((ress) => {
  377. uni.hideLoading();
  378. if (ress.status == 200) {
  379. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  380. if (this.type == "specimenPlan" || this.type == "specimen") {
  381. if (type === 'scan') {
  382. setTimeout(() => {
  383. this.Scanning_again();
  384. }, 500)
  385. }
  386. }
  387. this.speNum = ress.specimenCount;
  388. uni.navigateTo({
  389. url: `../scanning_djInfo/scanning_djInfo?type=${
  390. this.queryObj.type
  391. }&type1=${
  392. this.queryObj.type1
  393. }&infoData=${encodeURIComponent(
  394. JSON.stringify(ress.data)
  395. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  396. this.queryObj.code
  397. }&dept=${this.queryObj.dept}&ids=${encodeURIComponent(
  398. JSON.stringify(this.ids)
  399. )}&model=${encodeURIComponent(
  400. JSON.stringify(ress)
  401. )}&speNum=${this.speNum}&accountObj=${encodeURIComponent(
  402. JSON.stringify(this.accountObj)
  403. )}&deptId=${this.deptId}&scanOrHand=${type}`,
  404. });
  405. } else {
  406. uni.navigateTo({
  407. url: `../scanning_djInfo/scanning_djInfo?type=${
  408. this.queryObj.type
  409. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  410. ress.msg
  411. }&deptCode=${this.queryObj.code}&dept=${
  412. this.queryObj.dept
  413. }&ids=${encodeURIComponent(
  414. JSON.stringify(this.ids)
  415. )}&infoData=${encodeURIComponent(
  416. JSON.stringify(ress.data)
  417. )}&model=${encodeURIComponent(
  418. JSON.stringify(ress)
  419. )}&accountObj=${encodeURIComponent(
  420. JSON.stringify(this.accountObj)
  421. )}&deptId=${this.deptId}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  422. });
  423. }
  424. });
  425. } else {
  426. uni.hideLoading();
  427. uni.showToast({
  428. icon: "none",
  429. title: "请求失败!",
  430. });
  431. }
  432. });
  433. // ------------------------------
  434. },
  435. // 查看未扫描标本
  436. getNoScanSpecimen() {
  437. if (!this.gotoFlag) {
  438. return;
  439. }
  440. this.gotoFlag = false;
  441. let ids = JSON.parse(this.queryObj.ids);
  442. uni.navigateTo({
  443. url: `../noScanSpecimen/noScanSpecimen?workOrderId=${encodeURIComponent(
  444. JSON.stringify(ids)
  445. )}&deptCode=${this.queryObj.code}`,
  446. });
  447. },
  448. // 正常完成扫描
  449. overFinish() {
  450. //完成扫描
  451. let postType = "";
  452. if (
  453. this.queryObj.type1 === "plan-spe-ddd-2" ||
  454. this.queryObj.type1 === "plan-spe-dsd-2" ||
  455. this.queryObj.type1 === "plan-spe-dsd-3"
  456. ) {
  457. postType = "finishPlanSpes";
  458. } else if (this.queryObj.type1 == "spe-ddd-2") {
  459. postType = "finishSpes";
  460. }
  461. let data = {
  462. type: this.queryObj.type1,
  463. ids: this.wcId,
  464. };
  465. uni.showLoading({
  466. title: "加载中",
  467. mask: true,
  468. });
  469. post("/workerOrder/" + postType, data).then((res) => {
  470. if (res.status == 200) {
  471. this.models2 = {
  472. disjunctor: true,
  473. title: "提示",
  474. content: `完成扫描成功`,
  475. icon: "success",
  476. operate: {
  477. know: "知道了",
  478. },
  479. };
  480. } else {
  481. uni.hideLoading();
  482. uni.showToast({
  483. icon: "none",
  484. title: "请求失败!",
  485. });
  486. }
  487. });
  488. },
  489. // 确定
  490. ok() {
  491. this.models.disjunctor = false;
  492. if (this.modelFlag === "complete") {
  493. uni.showLoading({
  494. title: "加载中",
  495. mask: true,
  496. });
  497. let ids = JSON.parse(this.queryObj.ids);
  498. let postData = {
  499. ids,
  500. sign: true,
  501. deptQrCode: this.queryObj.code,
  502. };
  503. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  504. uni.hideLoading();
  505. if (ress.status == 200) {
  506. if (this.wcFlag) {
  507. //正常完成扫描
  508. this.overFinish();
  509. } else {
  510. this.gotoOver();
  511. }
  512. } else if (ress.status == 1000035) {
  513. let content = "";
  514. if (
  515. this.queryObj.type1 === "spe-ddd-2" ||
  516. this.queryObj.type1 === "plan-spe-ddd-2"
  517. ) {
  518. //待到达
  519. content =
  520. `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
  521. } else {
  522. //待送达
  523. this.content = `本工单已签到<strong class="red">${
  524. ress.scanSet ? ress.scanSet.join("、") : ""
  525. }</strong>,剩余需签到科室<strong class="red">${
  526. ress.notScanSet ? ress.notScanSet.join("、") : ""
  527. }</strong>,总签收<strong class="red">${
  528. ress.totalAcceptance
  529. }</strong>只,剩余<strong class="red">${
  530. ress.notAcceptance
  531. }</strong>只未签收,您确定完成工单吗?`;
  532. content =
  533. `您在<strong class="red">${ress.deptName}</strong>检验科扫描了<strong class="red">${ress.deptScanNum}</strong>个标本,还需扫描<strong class="red">${ress.deptNotScanNum}</strong>标本。`;
  534. }
  535. this.models2 = {
  536. disjunctor: true,
  537. title: "提示",
  538. content,
  539. icon: "warn",
  540. operate: {
  541. ok: "确定",
  542. cancel: "取消",
  543. },
  544. };
  545. } else {
  546. uni.showToast({
  547. icon: "none",
  548. title: "请求失败!",
  549. });
  550. }
  551. });
  552. } else if (this.modelFlag === "complete1") {
  553. //1对1标本完成工单
  554. let ids = this.wcId;
  555. uni.showLoading({
  556. title: "加载中",
  557. mask: true,
  558. });
  559. post("/workerOrder/finishSpeOrder", ids).then((res) => {
  560. if (res.status == 200) {
  561. uni.reLaunch({
  562. url: "../receiptpage/receiptpage",
  563. });
  564. } else {
  565. uni.hideLoading();
  566. uni.showToast({
  567. icon: "none",
  568. title: "请求失败!",
  569. });
  570. }
  571. });
  572. }
  573. },
  574. // 取消
  575. cancel() {
  576. this.models.disjunctor = false;
  577. },
  578. // 确定
  579. ok2() {
  580. this.models2.disjunctor = false;
  581. let ids = JSON.parse(this.queryObj.ids);
  582. let postData = {
  583. ids,
  584. deptQrCode: this.queryObj.code,
  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.reLaunch({
  613. url: "../receiptpage/receiptpage",
  614. });
  615. },
  616. //完成扫描
  617. Scanning_complete(id) {
  618. this.modelFlag = "complete";
  619. this.wcId = id;
  620. if (
  621. this.queryObj.type1 == "plan-spe-ddd-2" ||
  622. this.queryObj.type1 == "spe-ddd-2"
  623. ) {
  624. this.wcFlag = true;
  625. this.models = {
  626. disjunctor: true,
  627. title: "提示",
  628. content: "是否确定标本已扫描完成?",
  629. icon: "warn",
  630. operate: {
  631. ok: "确定",
  632. cancel: "取消",
  633. },
  634. };
  635. } else if (
  636. this.queryObj.type1 == "plan-spe-dsd-2" ||
  637. this.queryObj.type1 == "plan-spe-dsd-3" ||
  638. this.queryObj.type1 == "spe-dsd-2" ||
  639. this.queryObj.type1 == "spe-dsd-3"
  640. ) {
  641. this.wcFlag = false;
  642. this.models = {
  643. disjunctor: true,
  644. title: "提示",
  645. content: "是否确定标本已扫描完成?",
  646. icon: "warn",
  647. operate: {
  648. ok: "确定",
  649. cancel: "取消",
  650. },
  651. };
  652. } else {
  653. this.gotoOver();
  654. }
  655. },
  656. // 跳转完成工单页面
  657. gotoOver() {
  658. uni.navigateTo({
  659. url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
  660. this.queryObj.type1
  661. }&deptCode=${this.queryObj.code}&dept=${
  662. this.queryObj.dept
  663. }&id=${encodeURIComponent(JSON.stringify(this.wcId))}&content=${
  664. this.content
  665. }`,
  666. });
  667. },
  668. //一对一完成工单
  669. Scanning_complete1(id) {
  670. this.modelFlag = "complete1";
  671. this.wcId = id;
  672. this.models = {
  673. disjunctor: true,
  674. title: "提示",
  675. content: "是否确定标本配送完成?",
  676. icon: "warn",
  677. operate: {
  678. ok: "确定",
  679. cancel: "取消",
  680. },
  681. };
  682. },
  683. //继续扫描
  684. Scanning_again() {
  685. if (!this.SMFlag) {
  686. return;
  687. }
  688. this.SMFlag = false;
  689. SM()
  690. .then((ress1) => {
  691. this.hand_scanning_common(ress1, 'scan');
  692. })
  693. .catch((err) => {
  694. this.SMFlag = true;
  695. });
  696. },
  697. // 知道了
  698. showAlert() {
  699. uni.navigateTo({
  700. url: "../receiptpage/receiptpage",
  701. });
  702. },
  703. },
  704. onShow() {
  705. this.SMFlag = true;
  706. this.gotoFlag = true;
  707. },
  708. onLoad(options) {
  709. console.log(options, "djEnd");
  710. if (options.speNum) {
  711. this.speNum = options.speNum;
  712. }
  713. if (options.accountObj && options.accountObj != "undefined") {
  714. this.accountObj = JSON.parse(options.accountObj);
  715. }
  716. if (options.deptId && options.deptId != "undefined") {
  717. this.deptId = options.deptId;
  718. }
  719. this.queryObj = options;
  720. let list = JSON.parse(options.model); //签到返回的信息
  721. this.code = options.code; //二维码code
  722. this.ids = options.ids && JSON.parse(options.ids); //科室ID数组
  723. this.infoDATA = list;
  724. if (options.type) {
  725. //关联类型
  726. this.type = options.type;
  727. } else {
  728. this.type = list.type;
  729. }
  730. this.type1 = options.type1;
  731. // #ifdef APP-PLUS
  732. webHandle("no", "app");
  733. // #endif
  734. // #ifdef H5
  735. webHandle("no", "wx");
  736. // #endif
  737. },
  738. };
  739. </script>
  740. <style lang="less">
  741. .Scanning_djEnd {
  742. padding: 0px 20rpx;
  743. .Scanning_top {
  744. min-height: 270rpx;
  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. }
  768. }
  769. .Scanning_cont {
  770. font-size: 32rpx;
  771. text-align: center;
  772. view {
  773. margin-bottom: 16rpx;
  774. }
  775. .text {
  776. margin-top: 24rpx;
  777. color: #35b34a;
  778. }
  779. .text1 {
  780. margin-top: 24rpx;
  781. color: #ff3b53;
  782. }
  783. }
  784. .foot_btn {
  785. line-height: 88rpx;
  786. height: 100rpx;
  787. margin-top: 40rpx;
  788. text-align: center;
  789. display: flex;
  790. view {
  791. height: 88rpx;
  792. flex: 1;
  793. margin: 0 1%;
  794. background-image: linear-gradient(to right, #72c172, #3bb197);
  795. color: #fff;
  796. border-radius: 8rpx;
  797. font-size: 32rpx;
  798. margin-top: 16rpx;
  799. }
  800. }
  801. .foot_btn_spe {
  802. line-height: 88rpx;
  803. height: 100rpx;
  804. margin-top: 40rpx;
  805. text-align: center;
  806. display: flex;
  807. justify-content: space-between;
  808. flex-wrap: wrap;
  809. &::after {
  810. content: '';
  811. flex: 1;
  812. }
  813. view {
  814. height: 88rpx;
  815. width: 48%;
  816. margin: 0 1%;
  817. background-image: linear-gradient(to right, #72c172, #3bb197);
  818. color: #fff;
  819. border-radius: 8rpx;
  820. font-size: 32rpx;
  821. margin-top: 16rpx;
  822. }
  823. }
  824. }
  825. </style>