scanning_all.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228
  1. <template>
  2. <view class="Scanning_all">
  3. <view class="Scanning">
  4. <view class="Scanning_top" id="Scanning_tops" :animation="animationData">
  5. <view class="Scanning_top_icon">
  6. <text class="cubeic-ok icon_transport transport-duigou"></text>
  7. </view>
  8. <view class="Scanning_top_text">
  9. <view class="text1">签到成功</view>
  10. </view>
  11. <view class="Scanning_cont">
  12. 当前科室关联多个工单,请查看工单信息,
  13. <view>可选择多个工单后,点击 一键送达 完成配送.</view>
  14. </view>
  15. </view>
  16. <view class="title" v-if="workData && workData.length > 0">
  17. <text class="span1">工单信息</text>
  18. <text class="span2" @click="all()" v-if="tabType != 'specimenPlan'">全选</text>
  19. <text class="span3" @click="Dall()">全不选</text>
  20. </view>
  21. <view class="tabs" v-if="workData && workData.length > 0">
  22. <view class="tab">
  23. <view @click="act('drugsBag')" v-if="infoDATA['drugsBag']">
  24. <view id="10" :class="{ acts: tabType == 'drugsBag' }">药品({{ infoDATA.drugsBag.length }})</view>
  25. </view>
  26. <view @click="act('specimen')" v-if="infoDATA['specimen']">
  27. <view id="40" :class="{ acts: tabType == 'specimen' }">标本({{ infoDATA.specimen.length }})</view>
  28. </view>
  29. <view @click="act('specimenPlan')" v-if="infoDATA['specimenPlan']">
  30. <view id="40" :class="{ acts: tabType == 'specimenPlan' }">标本轮巡({{ infoDATA.specimenPlan.length }})</view>
  31. </view>
  32. <view @click="act('patientTransport')" v-if="infoDATA['patientTransport']">
  33. <view id="20" :class="{ acts: tabType == 'patientTransport' }">患者转运({{ infoDATA.patientTransport.length }})
  34. </view>
  35. </view>
  36. <view @click="act('inspect')" v-if="infoDATA['inspect']">
  37. <view id="30" :class="{ acts: tabType == 'inspect' }">患者陪检({{ infoDATA.inspect.length }})</view>
  38. </view>
  39. <view @click="act('jPBag')" v-if="infoDATA['jPBag']">
  40. <view id="40" :class="{ acts: tabType == 'jPBag' }">静配({{ infoDATA.jPBag.length }})</view>
  41. </view>
  42. <view @click="act('other')" v-if="infoDATA['other']">
  43. <view id="40" :class="{ acts: tabType == 'other' }">其他({{ infoDATA.other.length }})</view>
  44. </view>
  45. <view @click="act('blood')" v-if="infoDATA['blood']">
  46. <view id="40" :class="{ acts: tabType == 'blood' }">血制品({{ infoDATA.blood.length }})</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="page_items" v-if="!workData" style="font-size: 18px; margin-top: 15%">
  51. <view class="zwsj">
  52. <image class="zwsj_img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  53. <view class="zwsj_txt">暂无工单</view>
  54. </view>
  55. </view>
  56. <view class="page_items footerOtherMargin" v-if="workData && workData.length > 0">
  57. <view class="page_item" v-for="(infoDATA, i) of workData" :key="i">
  58. <view class="page_item_top">
  59. <view class="page_item_top_L">
  60. <text v-show="hasSelect(infoDATA.id)" class="ac" @click="ac(infoDATA, i)" :id="infoDATA.id">
  61. <text class="ac-span"></text>
  62. </text>
  63. <text v-show="!hasSelect(infoDATA.id)" class="ac1" @click="ac1(infoDATA, i)"
  64. :id="infoDATA.id + '0'"></text>
  65. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  66. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  67. <text class="page_item_cont_start_txt">
  68. <text class="cubeic-star icon_transport transport-shiwujiaoxing"></text>
  69. {{ infoDATA.emergencyType.name }}
  70. </text>
  71. </view>
  72. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  73. <text class="page_item_cont_start_txt">
  74. <text class="cubeic-star icon_transport transport-shiwujiaoxing"></text>
  75. {{ infoDATA.emergencyType.name }}
  76. </text>
  77. </view>
  78. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  79. <text class="page_item_cont_start_txt">
  80. <text class="cubeic-star icon_transport transport-shiwujiaoxing"></text>
  81. {{ infoDATA.emergencyType.name }}
  82. </text>
  83. </view>
  84. </view>
  85. <view class="page_item_top_R">
  86. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'specimen'">标本</text>
  87. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'specimenPlan'">标本</text>
  88. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">药品</text>
  89. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'jPBag'">静配</text>
  90. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'inspect'">患者陪检</text>
  91. <text class="L_iocn" v-if="
  92. infoDATA.taskType.associationType.value == 'patientTransport'
  93. ">患者转运</text>
  94. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'other'">其他</text>
  95. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'ordinary' && infoDATA.taskType.ordinaryField.value == 'blood'">血制品</text>
  96. </view>
  97. <view class="L"></view>
  98. <view class="R"></view>
  99. </view>
  100. <view class="page_item_cont">
  101. <view class="page_item_cont_T">
  102. <view class="page_item_cont_title">
  103. <text> <text class="starting">起</text> 点科室 </text>
  104. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  105. </view>
  106. </view>
  107. <view class="line"></view>
  108. <view class="page_item_cont_B">
  109. <template v-if="infoDATA.taskType.associationType.value == 'inspect'">
  110. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.middleDept" :key="i">
  111. <text> <text class="End">检</text> 查科室 </text>
  112. <text class="text_big">{{ dept.dept }}</text>
  113. <view></view>
  114. </view>
  115. </template>
  116. <template v-if="infoDATA.taskType.associationType.value != 'inspect'">
  117. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  118. <text> <text class="End">终</text> 点科室 </text>
  119. <text class="text_big">{{ dept.dept }}</text>
  120. </view>
  121. </template>
  122. </view>
  123. </view>
  124. <view class="page_item_foot">
  125. <view class="page_item_foot_text">
  126. <text class="text1">状态</text>
  127. <text class="text2" v-if="
  128. !(
  129. infoDATA.gdState.value == '5' &&
  130. infoDATA.taskType.associationType.value == 'inspect'
  131. )
  132. ">{{ infoDATA.gdState.name }}</text>
  133. <text class="text2" v-if="
  134. infoDATA.gdState.value == '5' &&
  135. infoDATA.taskType.associationType.value == 'inspect'
  136. ">待送回</text>
  137. </view>
  138. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  139. <text class="text1">预计响应时间</text>
  140. <text class="text2">{{ infoDATA.estimeResponseTime || '无' }}</text>
  141. </view>
  142. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  143. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  144. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  145. <text class="text2">{{ infoDATA.estimeCompleteTime || '无' }}</text>
  146. </view>
  147. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  148. <text class="text1">预计到达时间</text>
  149. <text class="text2">{{ infoDATA.estimateArriveTime || '无' }}</text>
  150. </view>
  151. <view class="page_item_foot_text">
  152. <text class="text1">创建时间</text>
  153. <text class="text2">{{ infoDATA.startTime || '无' }}</text>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <view class="foot_btn2 footerPadding" v-if="workData && workData.length > 0">
  159. <view class="btn1" @click="allStart()" v-if="flag">一键操作</view>
  160. <view class="btn1" v-if="!flag">一键操作</view>
  161. <view class="btn1" @click="showAlert">知道了</view>
  162. </view>
  163. <view class="foot_btn1 footerPadding" v-if="!workData">
  164. <view class="btn3" @click="showAlert">知道了</view>
  165. </view>
  166. </view>
  167. <!-- 弹窗 -->
  168. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  169. @know="know" :operate="models.operate"></showModel>
  170. <!-- 填写交接人账号弹窗 -->
  171. <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  172. @cancel="hosCancel">
  173. </selectAccount>
  174. </view>
  175. </template>
  176. <script>
  177. import showModel from "../../components/showModel/showModel.vue";
  178. import {
  179. post,
  180. SM,
  181. webHandle
  182. } from "../../http/http.js";
  183. export default {
  184. data() {
  185. return {
  186. hosId: null,
  187. currentCode: '', //当前小扫描的科室二维码
  188. SMFlag: true,
  189. // 填写交接人账号弹窗model
  190. hosModels: {
  191. disjunctor: false,
  192. },
  193. // 弹窗model
  194. models: {
  195. disjunctor: false,
  196. },
  197. infoDATA: {},
  198. workData: [],
  199. tabType: "", //当前选中项
  200. userId: {
  201. ids: [],
  202. },
  203. typeData: [],
  204. types: false,
  205. code: "",
  206. deptName: '',
  207. flag: true, //一键操作,禁止多次
  208. flagTimer: null,
  209. selectArr: [], //选中项
  210. animationData: {}, //动画
  211. };
  212. },
  213. methods: {
  214. // 填写交接人账号-确认
  215. hosOk(data) {
  216. console.log(data);
  217. const {
  218. accountName,
  219. account,
  220. accountId
  221. } = data;
  222. if (!accountName && !account) {
  223. //没有填写交接人
  224. uni.showModal({
  225. title: "提示",
  226. content: "请填写交接人账号!",
  227. showCancel: false,
  228. success: function(res) {
  229. if (res.confirm) {
  230. console.log("用户点击确定");
  231. } else if (res.cancel) {
  232. console.log("用户点击取消");
  233. }
  234. },
  235. });
  236. return;
  237. } else if ((!accountName && account) || (accountName && !account)) {
  238. //没有填写交接人
  239. uni.showModal({
  240. title: "提示",
  241. content: "请填写正确的交接人账号!",
  242. showCancel: false,
  243. success: function(res) {
  244. if (res.confirm) {
  245. console.log("用户点击确定");
  246. } else if (res.cancel) {
  247. console.log("用户点击取消");
  248. }
  249. },
  250. });
  251. return;
  252. }
  253. this.hosModels.disjunctor = false;
  254. this.orderDeptHandler(false, data);
  255. },
  256. // 填写交接人账号-取消
  257. hosCancel() {
  258. this.hosModels.disjunctor = false;
  259. this.flag = true;
  260. },
  261. // 填写交接人账号弹窗
  262. showSelectAccount() {
  263. this.hosModels = {
  264. title: "填写交接人账号",
  265. disjunctor: true,
  266. };
  267. },
  268. // 知道了
  269. showAlert() {
  270. uni.navigateTo({
  271. url: "../receiptpage/receiptpage",
  272. });
  273. },
  274. //科室签到
  275. //trueBigScanner----判断是否大扫描
  276. //bigScanner----判断是否需要交接人
  277. //accountObj----弹窗填写的交接人信息
  278. orderDeptHandler(bigScanner, accountObj) {
  279. let type = "orderSign/" + this.code;
  280. let list = {
  281. ids: this.userId.ids,
  282. trueBigScanner: ['666']
  283. };
  284. bigScanner && (list.bigScanner = ['666']);
  285. if (accountObj) {
  286. list.handover = [accountObj.accountId];
  287. }
  288. uni.showLoading({
  289. title: "加载中",
  290. mask: true,
  291. });
  292. post("/workerOrder/" + type, list).then((res) => {
  293. console.log(this.tabType)
  294. uni.hideLoading();
  295. if (res.status == 200) {
  296. if (this.tabType == "inspect" || this.tabType == "patientTransport") {
  297. if (res.ids) {
  298. for (var i = 0; i < this.userId.ids.length; i++) {
  299. if (this.userId.ids[i] == res.ids[0]) {
  300. this.userId.ids.splice(i, 1);
  301. }
  302. }
  303. }
  304. uni.navigateTo({
  305. url: `../scanning_djInfo/scanning_djInfo?type=${
  306. this.tabType
  307. }&type1=${res.type}&infoData=${res.data}&status=${
  308. res.status
  309. }&msg=${res.msg}&deptCode=${this.code}&dept=${
  310. res.dept
  311. }&ids=${encodeURIComponent(
  312. JSON.stringify(this.userId.ids)
  313. )}&model=${encodeURIComponent(JSON.stringify(res))}`,
  314. });
  315. } else if (this.tabType == 'specimenPlan') {
  316. // -----------------------------
  317. console.log(this.selectArr, '选中工单')
  318. let gd = this.infoDATA.specimenPlan.find(v => v.id == this.selectArr[0]);
  319. let startDeptId = gd.startDept.id; //起点科室id
  320. let isDigitalHandover = gd.taskType.isDigitalHandover; //是否数字交接开关
  321. let signDeptId = res.deptId; //签到的科室id
  322. let gdId = gd.id;
  323. let gdState = gd.gdState.value;
  324. let endDepts = gd.endDepts.map(v => v.id).toString();
  325. uni.navigateTo({
  326. url: `../scanning_djEnd/scanning_djEnd?type=${
  327. this.tabType
  328. }&type1=${res.type}&code=${this.code}&dept=${
  329. res.dept
  330. }&ids=${encodeURIComponent(
  331. JSON.stringify(this.userId.ids)
  332. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}&startDeptId=${startDeptId}&isDigitalHandover=${isDigitalHandover}&signDeptId=${signDeptId}&gdId=${gdId}&gdState=${gdState}&endDepts=${endDepts}`,
  333. });
  334. } else if (this.tabType == 'specimen') {
  335. if (res.deptType && res.deptType.value === 'middleRoom') {
  336. // 如果是中转科室
  337. uni.navigateTo({
  338. url: `../checkAfterBigScreen/checkAfterBigScreen?type=${
  339. this.tabType
  340. }&type1=${res.type}&code=${this.code}&dept=${
  341. res.dept
  342. }&ids=${encodeURIComponent(
  343. JSON.stringify(this.userId.ids)
  344. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
  345. });
  346. } else {
  347. uni.navigateTo({
  348. url: `../scanning_djEnd/scanning_djEnd?type=${
  349. this.tabType
  350. }&type1=${res.type}&code=${this.code}&dept=${
  351. res.dept
  352. }&ids=${encodeURIComponent(
  353. JSON.stringify(this.userId.ids)
  354. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
  355. });
  356. }
  357. } else {
  358. uni.navigateTo({
  359. url: `../scanning_djEnd/scanning_djEnd?type=${
  360. this.tabType
  361. }&type1=${res.type}&code=${this.code}&dept=${
  362. res.dept
  363. }&ids=${encodeURIComponent(
  364. JSON.stringify(this.userId.ids)
  365. )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
  366. });
  367. }
  368. } else if (res.status == "0000") {
  369. this.showSelectAccount();
  370. } else {
  371. this.flag = true;
  372. uni.navigateTo({
  373. url: `../scanning_djEnd/scanning_djEnd?type=${this.tabType}&type1=${
  374. res.type
  375. }&code=${this.code}&dept=${res.dept}&ids=${encodeURIComponent(
  376. JSON.stringify(this.userId.ids)
  377. )}&model=${encodeURIComponent(JSON.stringify(res))}&deptId=${res.deptId}`,
  378. });
  379. }
  380. });
  381. },
  382. //一键操作
  383. allStart() {
  384. console.log(this.tabType)
  385. clearTimeout(this.flagTimer);
  386. this.flagTimer = setTimeout(() => {
  387. this.flag = false;
  388. let list = {};
  389. let type = "";
  390. console.log(this.userId)
  391. if (this.userId.ids.length > 0) {
  392. if (this.tabType == "blood") {
  393. // 万能交接服务的血制品
  394. let postData = {
  395. "idx": 0,
  396. "sum": 1,
  397. "taskTypeConfig": {
  398. "taskTypeDTO": {
  399. "hosId": {
  400. "id": this.hosId
  401. },
  402. "ordinaryField": {
  403. "value": "blood"
  404. }
  405. }
  406. }
  407. };
  408. uni.showLoading({
  409. title: "加载中",
  410. mask: true,
  411. });
  412. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((result) => {
  413. uni.hideLoading();
  414. if(result.status == 200){
  415. if(result.list[0].checkType){
  416. if(result.list[0].checkType.value == 1){
  417. // 起点终点科室按照血制品类型进行核对
  418. uni.navigateTo({
  419. url: `../signIn_blood/signIn_blood?deptName=${this.deptName}&orderId=${this.userId.ids[0]}`,
  420. });
  421. }else if(result.list[0].checkType.value == 2){
  422. // 终点科室无需扫码进行核对
  423. uni.navigateTo({
  424. url: `../check_blood/check_blood?orderId=${this.userId.ids[0]}`,
  425. });
  426. }
  427. }else{
  428. uni.showToast({
  429. icon: "none",
  430. title: "请前往血制品配置页面配置核对方式!",
  431. });
  432. }
  433. }else{
  434. uni.showToast({
  435. icon: "none",
  436. title: "请求失败!",
  437. });
  438. }
  439. })
  440. }else if (
  441. this.tabType == "drugsBag" ||
  442. this.tabType == "jPBag" ||
  443. this.tabType == "other" ||
  444. this.tabType == "specimen" ||
  445. this.tabType == "specimenPlan"
  446. ) {
  447. this.orderDeptHandler(true);
  448. } else {
  449. if (!this.SMFlag) {
  450. return;
  451. }
  452. this.SMFlag = false;
  453. SM()
  454. .then((ress1) => {
  455. uni.showLoading({
  456. title: "加载中",
  457. mask: true,
  458. });
  459. //检验二维码的有效性
  460. post("/dept/scanning", {
  461. content: ress1,
  462. }).then((result) => {
  463. this.SMFlag = true;
  464. this.currentCode = result.code;
  465. if (result.state == 200 || result.state == 201) {
  466. let ress = result.code;
  467. if (ress) {
  468. if (this.tabType == "patientTransport") {
  469. type = "handleTrans";
  470. let data = {
  471. ids: this.userId.ids,
  472. deptCode: this.code,
  473. code: ress,
  474. };
  475. list = data;
  476. }
  477. if (this.tabType == "inspect") {
  478. type = "handleIns";
  479. let data = {
  480. ids: this.userId.ids,
  481. deptCode: this.code,
  482. code: ress,
  483. };
  484. list = data;
  485. }
  486. post("/workerOrder/" + type, list).then((res) => {
  487. uni.hideLoading();
  488. if (res.status == 200) {
  489. if (
  490. this.tabType == "inspect" ||
  491. this.tabType == "patientTransport"
  492. ) {
  493. if (res.ids) {
  494. for (var i = 0; i < this.userId.ids.length; i++) {
  495. if (this.userId.ids[i] == res.ids[0]) {
  496. this.userId.ids.splice(i, 1);
  497. }
  498. }
  499. }
  500. uni.navigateTo({
  501. url: `../scanning_djInfo/scanning_djInfo?type=${
  502. this.tabType
  503. }&type1=${res.type}&infoData=${res.data}&status=${
  504. res.status
  505. }&msg=${res.msg}&deptCode=${this.code}&dept=${
  506. res.dept
  507. }&ids=${encodeURIComponent(
  508. JSON.stringify(this.userId.ids)
  509. )}&model=${encodeURIComponent(
  510. JSON.stringify(res)
  511. )}`,
  512. });
  513. } else {
  514. uni.navigateTo({
  515. url: `../scanning_djEnd/scanning_djEnd?type=${
  516. this.tabType
  517. }&type1=${res.type}&dept=${
  518. res.dept
  519. }&ids=${encodeURIComponent(
  520. JSON.stringify(this.userId.ids)
  521. )}&model=${encodeURIComponent(
  522. JSON.stringify(res)
  523. )}&code=${this.code}`,
  524. });
  525. }
  526. } else {
  527. uni.navigateTo({
  528. url: `../scanning_djEnd/scanning_djEnd?type=${
  529. this.tabType
  530. }&type1=${res.type}&dept=${
  531. res.dept
  532. }&ids=${encodeURIComponent(
  533. JSON.stringify(this.userId.ids)
  534. )}&model=${encodeURIComponent(
  535. JSON.stringify(res)
  536. )}&code=${this.code}&qrcode=${this.currentCode}`,
  537. });
  538. }
  539. });
  540. }
  541. } else {
  542. this.flag = true;
  543. uni.hideLoading();
  544. uni.showToast({
  545. icon: "none",
  546. title: "请求失败!",
  547. });
  548. }
  549. });
  550. })
  551. .catch((err) => {
  552. this.SMFlag = true;
  553. });
  554. }
  555. } else {
  556. this.flag = true;
  557. this.models = {
  558. disjunctor: true,
  559. title: "提示",
  560. content: "请选择工单!",
  561. icon: "warn",
  562. operate: {
  563. know: "知道了",
  564. },
  565. };
  566. }
  567. }, 500);
  568. },
  569. typePD(data, list) {
  570. if (list) {
  571. if (data.length >= 2) {
  572. for (var i = 0; i < data.length; i++) {
  573. if (data[i].gdState.value != list.gdState.value) {
  574. this.typeData.splice(i, 1);
  575. this.types = true;
  576. }
  577. }
  578. } else {
  579. this.types = false;
  580. }
  581. } else if (data.length == 1) {
  582. this.types = false;
  583. } else {
  584. this.types = false;
  585. for (var i = 0; i < data.length; i++) {
  586. if (data[0].gdState.value != data[i].gdState.value) {
  587. this.typeData.splice(i, 1);
  588. this.types = true;
  589. }
  590. }
  591. }
  592. },
  593. act(type) {
  594. this.Dall();
  595. this.tabType = type;
  596. this.workData = this.infoDATA[type];
  597. },
  598. // 已选择的项中是否包含该id
  599. hasSelect(id) {
  600. return this.selectArr.includes(id);
  601. },
  602. //取消
  603. ac(data, i) {
  604. console.log(data, i, this.selectArr, this.userId.ids, this.typeData);
  605. // id放入数组
  606. this.selectArr = this.selectArr.filter((item) => item != data.id);
  607. for (var i = 0; i < this.userId.ids.length; i++) {
  608. if (this.userId.ids[i] == data.id) {
  609. this.typeData.splice(i, 1);
  610. this.userId.ids.splice(i, 1);
  611. }
  612. }
  613. },
  614. //选中
  615. ac1(data, i) {
  616. console.log(data, i, this.userId.ids, '选中');
  617. if (this.tabType == 'specimenPlan' && this.typeData.length > 0) {
  618. this.typeData = [data];
  619. } else {
  620. this.typeData.push(data);
  621. }
  622. this.types = false;
  623. for (var i = 0; i < this.typeData.length; i++) {
  624. if (this.typeData[0].gdState.value != this.typeData[i].gdState.value) {
  625. this.models = {
  626. disjunctor: true,
  627. title: "提示",
  628. content: "请选择不同状态的工单!",
  629. icon: "warn",
  630. operate: {
  631. know: "知道了",
  632. },
  633. };
  634. this.typeData.splice(i, 1);
  635. this.types = true;
  636. }
  637. }
  638. if (!this.types) {
  639. if (this.tabType == 'specimenPlan' && this.typeData.length > 0) {
  640. this.userId.ids = [data.id];
  641. this.selectArr = [data.id];
  642. } else {
  643. this.userId.ids.push(data.id);
  644. this.selectArr.push(data.id);
  645. }
  646. }
  647. },
  648. //全选
  649. all() {
  650. let id = [];
  651. this.typeData = JSON.parse(JSON.stringify(this.workData));
  652. this.typePD(this.workData);
  653. if (this.types) {
  654. this.models = {
  655. disjunctor: true,
  656. title: "提示",
  657. content: "请选择不同状态的工单!",
  658. icon: "warn",
  659. operate: {
  660. know: "知道了",
  661. },
  662. };
  663. this.typeData = [];
  664. } else {
  665. for (var i = 0; i < this.workData.length; i++) {
  666. id.push(this.workData[i].id);
  667. this.selectArr.push(this.workData[i].id);
  668. }
  669. this.userId.ids = id;
  670. }
  671. },
  672. //全不选
  673. Dall() {
  674. this.selectArr = [];
  675. this.typeData = [];
  676. this.userId.ids = [];
  677. },
  678. texiao() {
  679. setTimeout(() => {
  680. this.animation.height(0).opacity(0).step();
  681. this.animationData = this.animation.export();
  682. }, 15000);
  683. },
  684. // 知道了
  685. know() {
  686. this.models.disjunctor = false;
  687. },
  688. },
  689. onLoad(options) {
  690. console.log(options, 'options');
  691. this.infoDATA = JSON.parse(options.infoDATA); //扫描科室码返回的信息
  692. console.log(this.infoDATA);
  693. this.code = options.code; //扫描科室码返回的二维码信息
  694. this.deptName = options.deptName; //扫描科室码返回的科室名称
  695. let arr = [];
  696. for (let key in this.infoDATA) {
  697. if(key === 'ordinary'){
  698. // 如果是万能交接服务,key值要从关联业务区分
  699. this.infoDATA['ordinary'].forEach(v => {
  700. arr.push(v.taskType.ordinaryField.value);
  701. if(this.infoDATA[v.taskType.ordinaryField.value]){
  702. this.infoDATA[v.taskType.ordinaryField.value].push(v);
  703. }else{
  704. this.infoDATA[v.taskType.ordinaryField.value] = [v];
  705. }
  706. })
  707. delete this.infoDATA['ordinary'];
  708. }else{
  709. arr.push(key);
  710. }
  711. }
  712. console.log(this.infoDATA);
  713. this.workData = this.infoDATA[arr[0]];
  714. this.tabType = arr[0];
  715. // #ifdef APP-PLUS
  716. webHandle("no", "app");
  717. // #endif
  718. // #ifdef H5
  719. webHandle("no", "wx");
  720. // #endif
  721. },
  722. onShow() {
  723. this.SMFlag = true;
  724. this.flag = true;
  725. // 创建动画
  726. this.animation = uni.createAnimation({
  727. duration: 500,
  728. timingFunction: "ease",
  729. delay: 2000,
  730. });
  731. setTimeout(() => {
  732. this.texiao();
  733. }, 500);
  734. },
  735. onHide() {
  736. this.animationData = {};
  737. },
  738. onUnload() {
  739. // 页面关闭后清空数据
  740. this.animationData = {};
  741. },
  742. created(){
  743. this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
  744. }
  745. };
  746. </script>
  747. <style lang="less">
  748. ::-webkit-scrollbar {
  749. width: 0;
  750. }
  751. ::-webkit-scrollbar-track {
  752. background-color: none;
  753. }
  754. ::-webkit-scrollbar-thumb {
  755. background-color: none;
  756. }
  757. ::-webkit-scrollbar-thumb:hover {
  758. background-color: none;
  759. }
  760. ::-webkit-scrollbar-thumb:active {
  761. background-color: none;
  762. }
  763. .Scanning_all {
  764. .title {
  765. font-size: 36rpx;
  766. margin-top: 20rpx;
  767. margin-bottom: 20rpx;
  768. font-weight: 700;
  769. position: relative;
  770. height: 40rpx;
  771. .span1 {
  772. position: absolute;
  773. left: 0;
  774. font-weight: 700;
  775. }
  776. .span2 {
  777. position: absolute;
  778. right: 20%;
  779. color: rgb(73, 184, 86);
  780. }
  781. .span3 {
  782. position: absolute;
  783. right: 0;
  784. color: rgb(73, 184, 86);
  785. }
  786. }
  787. .tabs {
  788. height: 90rpx;
  789. width: 100%;
  790. overflow-x: auto;
  791. overflow-y: hidden;
  792. position: relative;
  793. background: #fff;
  794. .acts {
  795. background: #ccc;
  796. height: 50rpx !important;
  797. width: 80% !important;
  798. border-radius: 20rpx;
  799. }
  800. .tab {
  801. display: flex;
  802. align-items: center;
  803. flex-wrap: nowrap;
  804. height: 90rpx;
  805. position: absolute;
  806. width: auto;
  807. padding-top: 6rpx;
  808. view {
  809. display: inline-block;
  810. width: 260rpx;
  811. line-height: 48rpx;
  812. font-size: 32rpx;
  813. height: 100%;
  814. text-align: center;
  815. }
  816. }
  817. }
  818. .Scanning {
  819. padding: 0 20rpx;
  820. height: calc(100% - 100rpx);
  821. // seimin
  822. .Scanning_top {
  823. height: 400rpx;
  824. opacity: 1;
  825. .Scanning_top_icon {
  826. width: 140rpx;
  827. height: 140rpx;
  828. margin: 0 auto;
  829. margin-top: 36rpx;
  830. border-radius: 50%;
  831. line-height: 140rpx;
  832. .cubeic-ok {
  833. font-size: 140rpx;
  834. color: #35b34a;
  835. }
  836. }
  837. .Scanning_top_text {
  838. .text1 {
  839. margin-top: 40rpx;
  840. font-size: 48rpx;
  841. text-align: center;
  842. }
  843. }
  844. .Scanning_cont {
  845. font-size: 32rpx;
  846. margin-top: 30rpx;
  847. text-align: center;
  848. .text1 {
  849. margin-top: 24rpx;
  850. color: #ff3b53;
  851. }
  852. }
  853. }
  854. .page_items {
  855. margin-bottom: 110rpx;
  856. .zwsj {
  857. margin-top: 180rpx;
  858. text-align: center;
  859. .zwsj-img {
  860. width: 560rpx;
  861. }
  862. .zwsj_txt {
  863. font-size: 36rpx;
  864. font-weight: 700;
  865. margin-top: 20rpx;
  866. text-align: center;
  867. }
  868. }
  869. .page_item {
  870. margin-top: 16rpx;
  871. min-height: 356rpx;
  872. background: #fff;
  873. border-radius: 8rpx;
  874. overflow: hidden;
  875. padding: 0 16rpx;
  876. border: 2rpx solid #e5e9ed;
  877. .L {
  878. width: 40rpx;
  879. height: 40rpx;
  880. border-radius: 50%;
  881. background: #f9fafb;
  882. position: relative;
  883. left: -50rpx;
  884. top: 66rpx;
  885. }
  886. .R {
  887. width: 40rpx;
  888. height: 40rpx;
  889. border-radius: 50%;
  890. background: #f9fafb;
  891. position: relative;
  892. float: right;
  893. right: -50rpx;
  894. top: 26rpx;
  895. }
  896. .starting {
  897. width: 50rpx;
  898. height: 50rpx;
  899. color: #fff;
  900. background: #49b856;
  901. display: inline-block;
  902. border-radius: 50%;
  903. text-align: center;
  904. line-height: 46rpx;
  905. font-size: 32rpx;
  906. margin-right: 6rpx;
  907. }
  908. .End {
  909. width: 50rpx;
  910. height: 50rpx;
  911. color: #fff;
  912. background: #39b199;
  913. display: inline-block;
  914. border-radius: 50%;
  915. text-align: center;
  916. line-height: 46rpx;
  917. font-size: 32rpx;
  918. margin-right: 6rpx;
  919. }
  920. .page_item_top {
  921. height: 86rpx;
  922. border-bottom: 2rpx dashed #e5e9ed;
  923. padding: 0 16rpx;
  924. .page_item_top_L {
  925. height: 100%;
  926. float: left;
  927. line-height: 88rpx;
  928. display: flex;
  929. align-items: center;
  930. .ac {
  931. width: 32rpx;
  932. height: 32rpx;
  933. border: 2rpx solid #ccc;
  934. display: inline-block;
  935. position: relative;
  936. .ac-span {
  937. position: absolute;
  938. left: 50%;
  939. top: 50%;
  940. width: 24rpx;
  941. height: 24rpx;
  942. background: #39b199;
  943. transform: translate(-50%, -50%);
  944. }
  945. }
  946. .ac1 {
  947. width: 32rpx;
  948. height: 32rpx;
  949. border: 2rpx solid #ccc;
  950. display: inline-block;
  951. position: relative;
  952. }
  953. .emergencys {
  954. background: #ff3b53 !important;
  955. width: 124rpx !important;
  956. }
  957. .emergency {
  958. background: #ff3b53 !important;
  959. }
  960. .emergency1 {
  961. background: #49b856 !important;
  962. }
  963. .page_item_cont_start {
  964. text-align: center;
  965. height: 44rpx;
  966. width: 104rpx;
  967. line-height: 44rpx;
  968. border-radius: 8rpx;
  969. background: #49b856;
  970. color: #fff;
  971. display: inline-block;
  972. .page_item_cont_start_txt {
  973. font-size: 28rpx;
  974. display: flex;
  975. align-items: center;
  976. justify-content: center;
  977. .cubeic-star {
  978. font-size: 28rpx;
  979. }
  980. }
  981. }
  982. .L_time {
  983. color: #6cc076;
  984. font-size: 32rpx;
  985. }
  986. .L_text {
  987. font-size: 32rpx;
  988. display: inline-block;
  989. font-weight: 700;
  990. margin-right: 8rpx;
  991. }
  992. }
  993. .page_item_top_R {
  994. height: 60rpx;
  995. float: right;
  996. padding-top: 20rpx;
  997. font-size: 32rpx;
  998. position: absolute;
  999. right: 50rpx;
  1000. .L_iocn {
  1001. display: inline-block;
  1002. height: 52rpx;
  1003. line-height: 48rpx;
  1004. color: rgb(7, 134, 60);
  1005. font-size: 36rpx;
  1006. font-weight: 700;
  1007. }
  1008. }
  1009. }
  1010. .page_item_cont {
  1011. min-height: 180rpx;
  1012. padding: 0 16rpx;
  1013. text-align: left;
  1014. position: relative;
  1015. .text_big {
  1016. font-size: 32rpx;
  1017. position: absolute;
  1018. right: 16rpx;
  1019. font-weight: 700;
  1020. margin-top: 10rpx;
  1021. }
  1022. .text_big2 {
  1023. font-size: 32rpx;
  1024. position: absolute;
  1025. right: 16rpx;
  1026. font-weight: 700;
  1027. }
  1028. .line {
  1029. height: 20rpx;
  1030. width: 2rpx;
  1031. border-left: 2rpx solid #e5e9ed;
  1032. position: absolute;
  1033. top: 82rpx;
  1034. left: 40rpx;
  1035. }
  1036. .lines {
  1037. height: 40%;
  1038. width: 2rpx;
  1039. border-left: 2rpx solid #e5e9ed;
  1040. position: absolute;
  1041. top: 23%;
  1042. left: 36rpx;
  1043. }
  1044. .page_item_cont_T {
  1045. padding-top: 28rpx;
  1046. font-size: 28rpx;
  1047. .page_item_cont_title {
  1048. height: 100%;
  1049. font-size: 32rpx;
  1050. }
  1051. }
  1052. .page_item_cont_B {
  1053. padding-top: 28rpx;
  1054. margin-bottom: 28rpx;
  1055. .page_item_cont_title {
  1056. height: 60rpx;
  1057. font-size: 32rpx;
  1058. }
  1059. .page_item_cont_title1 {
  1060. height: 60rpx;
  1061. line-height: 60rpx;
  1062. font-size: 32rpx;
  1063. padding-left: 64rpx;
  1064. }
  1065. }
  1066. }
  1067. .page_item_foot {
  1068. border-top: 2rpx dashed #e5e9ed;
  1069. border-bottom: 2rpx dashed #e5e9ed;
  1070. padding: 28rpx 16rpx;
  1071. text-align: left;
  1072. .page_item_foot_text {
  1073. height: 48rpx;
  1074. font-size: 32rpx;
  1075. line-height: 48rpx;
  1076. margin-bottom: 20rpx;
  1077. .text1 {
  1078. color: rgb(102, 102, 102);
  1079. }
  1080. .text2 {
  1081. float: right;
  1082. font-weight: 700;
  1083. }
  1084. }
  1085. }
  1086. #infos {
  1087. display: none;
  1088. }
  1089. .page_item_infos {
  1090. padding-bottom: 20rpx;
  1091. border-bottom: 2rpx dashed #e5e9ed;
  1092. .page_item_info2 {
  1093. text-align: left;
  1094. line-height: 60rpx;
  1095. font-size: 32rpx;
  1096. padding-left: 16rpx;
  1097. .page_item_foot_text {
  1098. height: 48rpx;
  1099. font-size: 32rpx;
  1100. line-height: 48rpx;
  1101. margin-bottom: 20rpx;
  1102. .text1 {
  1103. color: rgb(102, 102, 102);
  1104. }
  1105. .text2 {
  1106. float: right;
  1107. font-weight: 700;
  1108. }
  1109. }
  1110. }
  1111. }
  1112. }
  1113. }
  1114. .foot_btn2 {
  1115. position: fixed;
  1116. bottom: 0;
  1117. right: 20rpx;
  1118. left: 20rpx;
  1119. line-height: 66rpx;
  1120. height: 100rpx;
  1121. border-top: 2rpx solid #e5e9ed;
  1122. background: #f9fafb;
  1123. display: flex;
  1124. .btn1,
  1125. .btn2 {
  1126. height: 66rpx;
  1127. flex: 1;
  1128. margin: 0 2%;
  1129. background-image: linear-gradient(to right, #72c172, #3bb197);
  1130. color: #fff;
  1131. border-radius: 8rpx;
  1132. font-size: 32rpx;
  1133. margin-top: 16rpx;
  1134. text-align: center;
  1135. }
  1136. }
  1137. .foot_btn1 {
  1138. position: fixed;
  1139. bottom: 0;
  1140. right: 20rpx;
  1141. left: 20rpx;
  1142. line-height: 66rpx;
  1143. height: 100rpx;
  1144. border-top: 2rpx solid #e5e9ed;
  1145. background: #f9fafb;
  1146. text-align: center;
  1147. .btn3 {
  1148. height: 66rpx;
  1149. width: 100%;
  1150. background-image: linear-gradient(to right, #72c172, #3bb197);
  1151. color: #fff;
  1152. border-radius: 8rpx;
  1153. font-size: 32rpx;
  1154. margin-top: 16rpx;
  1155. }
  1156. }
  1157. }
  1158. }
  1159. </style>