scanning_all.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229
  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. "key": "ordinary_field",
  404. "value": "blood"
  405. }
  406. }
  407. }
  408. };
  409. uni.showLoading({
  410. title: "加载中",
  411. mask: true,
  412. });
  413. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((result) => {
  414. uni.hideLoading();
  415. if(result.status == 200){
  416. if(result.list[0].checkType){
  417. if(result.list[0].checkType.value == 1){
  418. // 起点终点科室按照血制品类型进行核对
  419. uni.navigateTo({
  420. url: `../signIn_blood/signIn_blood?deptName=${this.deptName}&orderId=${this.userId.ids[0]}`,
  421. });
  422. }else if(result.list[0].checkType.value == 2){
  423. // 终点科室无需扫码进行核对
  424. uni.navigateTo({
  425. url: `../check_blood/check_blood?orderId=${this.userId.ids[0]}`,
  426. });
  427. }
  428. }else{
  429. uni.showToast({
  430. icon: "none",
  431. title: "请前往血制品配置页面配置核对方式!",
  432. });
  433. }
  434. }else{
  435. uni.showToast({
  436. icon: "none",
  437. title: "请求失败!",
  438. });
  439. }
  440. })
  441. }else if (
  442. this.tabType == "drugsBag" ||
  443. this.tabType == "jPBag" ||
  444. this.tabType == "other" ||
  445. this.tabType == "specimen" ||
  446. this.tabType == "specimenPlan"
  447. ) {
  448. this.orderDeptHandler(true);
  449. } else {
  450. if (!this.SMFlag) {
  451. return;
  452. }
  453. this.SMFlag = false;
  454. SM()
  455. .then((ress1) => {
  456. uni.showLoading({
  457. title: "加载中",
  458. mask: true,
  459. });
  460. //检验二维码的有效性
  461. post("/dept/scanning", {
  462. content: ress1,
  463. }).then((result) => {
  464. this.SMFlag = true;
  465. this.currentCode = result.code;
  466. if (result.state == 200 || result.state == 201) {
  467. let ress = result.code;
  468. if (ress) {
  469. if (this.tabType == "patientTransport") {
  470. type = "handleTrans";
  471. let data = {
  472. ids: this.userId.ids,
  473. deptCode: this.code,
  474. code: ress,
  475. };
  476. list = data;
  477. }
  478. if (this.tabType == "inspect") {
  479. type = "handleIns";
  480. let data = {
  481. ids: this.userId.ids,
  482. deptCode: this.code,
  483. code: ress,
  484. };
  485. list = data;
  486. }
  487. post("/workerOrder/" + type, list).then((res) => {
  488. uni.hideLoading();
  489. if (res.status == 200) {
  490. if (
  491. this.tabType == "inspect" ||
  492. this.tabType == "patientTransport"
  493. ) {
  494. if (res.ids) {
  495. for (var i = 0; i < this.userId.ids.length; i++) {
  496. if (this.userId.ids[i] == res.ids[0]) {
  497. this.userId.ids.splice(i, 1);
  498. }
  499. }
  500. }
  501. uni.navigateTo({
  502. url: `../scanning_djInfo/scanning_djInfo?type=${
  503. this.tabType
  504. }&type1=${res.type}&infoData=${res.data}&status=${
  505. res.status
  506. }&msg=${res.msg}&deptCode=${this.code}&dept=${
  507. res.dept
  508. }&ids=${encodeURIComponent(
  509. JSON.stringify(this.userId.ids)
  510. )}&model=${encodeURIComponent(
  511. JSON.stringify(res)
  512. )}`,
  513. });
  514. } else {
  515. uni.navigateTo({
  516. url: `../scanning_djEnd/scanning_djEnd?type=${
  517. this.tabType
  518. }&type1=${res.type}&dept=${
  519. res.dept
  520. }&ids=${encodeURIComponent(
  521. JSON.stringify(this.userId.ids)
  522. )}&model=${encodeURIComponent(
  523. JSON.stringify(res)
  524. )}&code=${this.code}`,
  525. });
  526. }
  527. } else {
  528. uni.navigateTo({
  529. url: `../scanning_djEnd/scanning_djEnd?type=${
  530. this.tabType
  531. }&type1=${res.type}&dept=${
  532. res.dept
  533. }&ids=${encodeURIComponent(
  534. JSON.stringify(this.userId.ids)
  535. )}&model=${encodeURIComponent(
  536. JSON.stringify(res)
  537. )}&code=${this.code}&qrcode=${this.currentCode}`,
  538. });
  539. }
  540. });
  541. }
  542. } else {
  543. this.flag = true;
  544. uni.hideLoading();
  545. uni.showToast({
  546. icon: "none",
  547. title: "请求失败!",
  548. });
  549. }
  550. });
  551. })
  552. .catch((err) => {
  553. this.SMFlag = true;
  554. });
  555. }
  556. } else {
  557. this.flag = true;
  558. this.models = {
  559. disjunctor: true,
  560. title: "提示",
  561. content: "请选择工单!",
  562. icon: "warn",
  563. operate: {
  564. know: "知道了",
  565. },
  566. };
  567. }
  568. }, 500);
  569. },
  570. typePD(data, list) {
  571. if (list) {
  572. if (data.length >= 2) {
  573. for (var i = 0; i < data.length; i++) {
  574. if (data[i].gdState.value != list.gdState.value) {
  575. this.typeData.splice(i, 1);
  576. this.types = true;
  577. }
  578. }
  579. } else {
  580. this.types = false;
  581. }
  582. } else if (data.length == 1) {
  583. this.types = false;
  584. } else {
  585. this.types = false;
  586. for (var i = 0; i < data.length; i++) {
  587. if (data[0].gdState.value != data[i].gdState.value) {
  588. this.typeData.splice(i, 1);
  589. this.types = true;
  590. }
  591. }
  592. }
  593. },
  594. act(type) {
  595. this.Dall();
  596. this.tabType = type;
  597. this.workData = this.infoDATA[type];
  598. },
  599. // 已选择的项中是否包含该id
  600. hasSelect(id) {
  601. return this.selectArr.includes(id);
  602. },
  603. //取消
  604. ac(data, i) {
  605. console.log(data, i, this.selectArr, this.userId.ids, this.typeData);
  606. // id放入数组
  607. this.selectArr = this.selectArr.filter((item) => item != data.id);
  608. for (var i = 0; i < this.userId.ids.length; i++) {
  609. if (this.userId.ids[i] == data.id) {
  610. this.typeData.splice(i, 1);
  611. this.userId.ids.splice(i, 1);
  612. }
  613. }
  614. },
  615. //选中
  616. ac1(data, i) {
  617. console.log(data, i, this.userId.ids, '选中');
  618. if (this.tabType == 'specimenPlan' && this.typeData.length > 0) {
  619. this.typeData = [data];
  620. } else {
  621. this.typeData.push(data);
  622. }
  623. this.types = false;
  624. for (var i = 0; i < this.typeData.length; i++) {
  625. if (this.typeData[0].gdState.value != this.typeData[i].gdState.value) {
  626. this.models = {
  627. disjunctor: true,
  628. title: "提示",
  629. content: "请选择不同状态的工单!",
  630. icon: "warn",
  631. operate: {
  632. know: "知道了",
  633. },
  634. };
  635. this.typeData.splice(i, 1);
  636. this.types = true;
  637. }
  638. }
  639. if (!this.types) {
  640. if (this.tabType == 'specimenPlan' && this.typeData.length > 0) {
  641. this.userId.ids = [data.id];
  642. this.selectArr = [data.id];
  643. } else {
  644. this.userId.ids.push(data.id);
  645. this.selectArr.push(data.id);
  646. }
  647. }
  648. },
  649. //全选
  650. all() {
  651. let id = [];
  652. this.typeData = JSON.parse(JSON.stringify(this.workData));
  653. this.typePD(this.workData);
  654. if (this.types) {
  655. this.models = {
  656. disjunctor: true,
  657. title: "提示",
  658. content: "请选择不同状态的工单!",
  659. icon: "warn",
  660. operate: {
  661. know: "知道了",
  662. },
  663. };
  664. this.typeData = [];
  665. } else {
  666. for (var i = 0; i < this.workData.length; i++) {
  667. id.push(this.workData[i].id);
  668. this.selectArr.push(this.workData[i].id);
  669. }
  670. this.userId.ids = id;
  671. }
  672. },
  673. //全不选
  674. Dall() {
  675. this.selectArr = [];
  676. this.typeData = [];
  677. this.userId.ids = [];
  678. },
  679. texiao() {
  680. setTimeout(() => {
  681. this.animation.height(0).opacity(0).step();
  682. this.animationData = this.animation.export();
  683. }, 15000);
  684. },
  685. // 知道了
  686. know() {
  687. this.models.disjunctor = false;
  688. },
  689. },
  690. onLoad(options) {
  691. console.log(options, 'options');
  692. this.infoDATA = JSON.parse(options.infoDATA); //扫描科室码返回的信息
  693. console.log(this.infoDATA);
  694. this.code = options.code; //扫描科室码返回的二维码信息
  695. this.deptName = options.deptName; //扫描科室码返回的科室名称
  696. let arr = [];
  697. for (let key in this.infoDATA) {
  698. if(key === 'ordinary'){
  699. // 如果是万能交接服务,key值要从关联业务区分
  700. this.infoDATA['ordinary'].forEach(v => {
  701. arr.push(v.taskType.ordinaryField.value);
  702. if(this.infoDATA[v.taskType.ordinaryField.value]){
  703. this.infoDATA[v.taskType.ordinaryField.value].push(v);
  704. }else{
  705. this.infoDATA[v.taskType.ordinaryField.value] = [v];
  706. }
  707. })
  708. delete this.infoDATA['ordinary'];
  709. }else{
  710. arr.push(key);
  711. }
  712. }
  713. console.log(this.infoDATA);
  714. this.workData = this.infoDATA[arr[0]];
  715. this.tabType = arr[0];
  716. // #ifdef APP-PLUS
  717. webHandle("no", "app");
  718. // #endif
  719. // #ifdef H5
  720. webHandle("no", "wx");
  721. // #endif
  722. },
  723. onShow() {
  724. this.SMFlag = true;
  725. this.flag = true;
  726. // 创建动画
  727. this.animation = uni.createAnimation({
  728. duration: 500,
  729. timingFunction: "ease",
  730. delay: 2000,
  731. });
  732. setTimeout(() => {
  733. this.texiao();
  734. }, 500);
  735. },
  736. onHide() {
  737. this.animationData = {};
  738. },
  739. onUnload() {
  740. // 页面关闭后清空数据
  741. this.animationData = {};
  742. },
  743. created(){
  744. this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
  745. }
  746. };
  747. </script>
  748. <style lang="less">
  749. ::-webkit-scrollbar {
  750. width: 0;
  751. }
  752. ::-webkit-scrollbar-track {
  753. background-color: none;
  754. }
  755. ::-webkit-scrollbar-thumb {
  756. background-color: none;
  757. }
  758. ::-webkit-scrollbar-thumb:hover {
  759. background-color: none;
  760. }
  761. ::-webkit-scrollbar-thumb:active {
  762. background-color: none;
  763. }
  764. .Scanning_all {
  765. .title {
  766. font-size: 36rpx;
  767. margin-top: 20rpx;
  768. margin-bottom: 20rpx;
  769. font-weight: 700;
  770. position: relative;
  771. height: 40rpx;
  772. .span1 {
  773. position: absolute;
  774. left: 0;
  775. font-weight: 700;
  776. }
  777. .span2 {
  778. position: absolute;
  779. right: 20%;
  780. color: rgb(73, 184, 86);
  781. }
  782. .span3 {
  783. position: absolute;
  784. right: 0;
  785. color: rgb(73, 184, 86);
  786. }
  787. }
  788. .tabs {
  789. height: 90rpx;
  790. width: 100%;
  791. overflow-x: auto;
  792. overflow-y: hidden;
  793. position: relative;
  794. background: #fff;
  795. .acts {
  796. background: #ccc;
  797. height: 50rpx !important;
  798. width: 80% !important;
  799. border-radius: 20rpx;
  800. }
  801. .tab {
  802. display: flex;
  803. align-items: center;
  804. flex-wrap: nowrap;
  805. height: 90rpx;
  806. position: absolute;
  807. width: auto;
  808. padding-top: 6rpx;
  809. view {
  810. display: inline-block;
  811. width: 260rpx;
  812. line-height: 48rpx;
  813. font-size: 32rpx;
  814. height: 100%;
  815. text-align: center;
  816. }
  817. }
  818. }
  819. .Scanning {
  820. padding: 0 20rpx;
  821. height: calc(100% - 100rpx);
  822. // seimin
  823. .Scanning_top {
  824. height: 400rpx;
  825. opacity: 1;
  826. .Scanning_top_icon {
  827. width: 140rpx;
  828. height: 140rpx;
  829. margin: 0 auto;
  830. margin-top: 36rpx;
  831. border-radius: 50%;
  832. line-height: 140rpx;
  833. .cubeic-ok {
  834. font-size: 140rpx;
  835. color: #35b34a;
  836. }
  837. }
  838. .Scanning_top_text {
  839. .text1 {
  840. margin-top: 40rpx;
  841. font-size: 48rpx;
  842. text-align: center;
  843. }
  844. }
  845. .Scanning_cont {
  846. font-size: 32rpx;
  847. margin-top: 30rpx;
  848. text-align: center;
  849. .text1 {
  850. margin-top: 24rpx;
  851. color: #ff3b53;
  852. }
  853. }
  854. }
  855. .page_items {
  856. margin-bottom: 110rpx;
  857. .zwsj {
  858. margin-top: 180rpx;
  859. text-align: center;
  860. .zwsj-img {
  861. width: 560rpx;
  862. }
  863. .zwsj_txt {
  864. font-size: 36rpx;
  865. font-weight: 700;
  866. margin-top: 20rpx;
  867. text-align: center;
  868. }
  869. }
  870. .page_item {
  871. margin-top: 16rpx;
  872. min-height: 356rpx;
  873. background: #fff;
  874. border-radius: 8rpx;
  875. overflow: hidden;
  876. padding: 0 16rpx;
  877. border: 2rpx solid #e5e9ed;
  878. .L {
  879. width: 40rpx;
  880. height: 40rpx;
  881. border-radius: 50%;
  882. background: #f9fafb;
  883. position: relative;
  884. left: -50rpx;
  885. top: 66rpx;
  886. }
  887. .R {
  888. width: 40rpx;
  889. height: 40rpx;
  890. border-radius: 50%;
  891. background: #f9fafb;
  892. position: relative;
  893. float: right;
  894. right: -50rpx;
  895. top: 26rpx;
  896. }
  897. .starting {
  898. width: 50rpx;
  899. height: 50rpx;
  900. color: #fff;
  901. background: #49b856;
  902. display: inline-block;
  903. border-radius: 50%;
  904. text-align: center;
  905. line-height: 46rpx;
  906. font-size: 32rpx;
  907. margin-right: 6rpx;
  908. }
  909. .End {
  910. width: 50rpx;
  911. height: 50rpx;
  912. color: #fff;
  913. background: #39b199;
  914. display: inline-block;
  915. border-radius: 50%;
  916. text-align: center;
  917. line-height: 46rpx;
  918. font-size: 32rpx;
  919. margin-right: 6rpx;
  920. }
  921. .page_item_top {
  922. height: 86rpx;
  923. border-bottom: 2rpx dashed #e5e9ed;
  924. padding: 0 16rpx;
  925. .page_item_top_L {
  926. height: 100%;
  927. float: left;
  928. line-height: 88rpx;
  929. display: flex;
  930. align-items: center;
  931. .ac {
  932. width: 32rpx;
  933. height: 32rpx;
  934. border: 2rpx solid #ccc;
  935. display: inline-block;
  936. position: relative;
  937. .ac-span {
  938. position: absolute;
  939. left: 50%;
  940. top: 50%;
  941. width: 24rpx;
  942. height: 24rpx;
  943. background: #39b199;
  944. transform: translate(-50%, -50%);
  945. }
  946. }
  947. .ac1 {
  948. width: 32rpx;
  949. height: 32rpx;
  950. border: 2rpx solid #ccc;
  951. display: inline-block;
  952. position: relative;
  953. }
  954. .emergencys {
  955. background: #ff3b53 !important;
  956. width: 124rpx !important;
  957. }
  958. .emergency {
  959. background: #ff3b53 !important;
  960. }
  961. .emergency1 {
  962. background: #49b856 !important;
  963. }
  964. .page_item_cont_start {
  965. text-align: center;
  966. height: 44rpx;
  967. width: 104rpx;
  968. line-height: 44rpx;
  969. border-radius: 8rpx;
  970. background: #49b856;
  971. color: #fff;
  972. display: inline-block;
  973. .page_item_cont_start_txt {
  974. font-size: 28rpx;
  975. display: flex;
  976. align-items: center;
  977. justify-content: center;
  978. .cubeic-star {
  979. font-size: 28rpx;
  980. }
  981. }
  982. }
  983. .L_time {
  984. color: #6cc076;
  985. font-size: 32rpx;
  986. }
  987. .L_text {
  988. font-size: 32rpx;
  989. display: inline-block;
  990. font-weight: 700;
  991. margin-right: 8rpx;
  992. }
  993. }
  994. .page_item_top_R {
  995. height: 60rpx;
  996. float: right;
  997. padding-top: 20rpx;
  998. font-size: 32rpx;
  999. position: absolute;
  1000. right: 50rpx;
  1001. .L_iocn {
  1002. display: inline-block;
  1003. height: 52rpx;
  1004. line-height: 48rpx;
  1005. color: rgb(7, 134, 60);
  1006. font-size: 36rpx;
  1007. font-weight: 700;
  1008. }
  1009. }
  1010. }
  1011. .page_item_cont {
  1012. min-height: 180rpx;
  1013. padding: 0 16rpx;
  1014. text-align: left;
  1015. position: relative;
  1016. .text_big {
  1017. font-size: 32rpx;
  1018. position: absolute;
  1019. right: 16rpx;
  1020. font-weight: 700;
  1021. margin-top: 10rpx;
  1022. }
  1023. .text_big2 {
  1024. font-size: 32rpx;
  1025. position: absolute;
  1026. right: 16rpx;
  1027. font-weight: 700;
  1028. }
  1029. .line {
  1030. height: 20rpx;
  1031. width: 2rpx;
  1032. border-left: 2rpx solid #e5e9ed;
  1033. position: absolute;
  1034. top: 82rpx;
  1035. left: 40rpx;
  1036. }
  1037. .lines {
  1038. height: 40%;
  1039. width: 2rpx;
  1040. border-left: 2rpx solid #e5e9ed;
  1041. position: absolute;
  1042. top: 23%;
  1043. left: 36rpx;
  1044. }
  1045. .page_item_cont_T {
  1046. padding-top: 28rpx;
  1047. font-size: 28rpx;
  1048. .page_item_cont_title {
  1049. height: 100%;
  1050. font-size: 32rpx;
  1051. }
  1052. }
  1053. .page_item_cont_B {
  1054. padding-top: 28rpx;
  1055. margin-bottom: 28rpx;
  1056. .page_item_cont_title {
  1057. height: 60rpx;
  1058. font-size: 32rpx;
  1059. }
  1060. .page_item_cont_title1 {
  1061. height: 60rpx;
  1062. line-height: 60rpx;
  1063. font-size: 32rpx;
  1064. padding-left: 64rpx;
  1065. }
  1066. }
  1067. }
  1068. .page_item_foot {
  1069. border-top: 2rpx dashed #e5e9ed;
  1070. border-bottom: 2rpx dashed #e5e9ed;
  1071. padding: 28rpx 16rpx;
  1072. text-align: left;
  1073. .page_item_foot_text {
  1074. height: 48rpx;
  1075. font-size: 32rpx;
  1076. line-height: 48rpx;
  1077. margin-bottom: 20rpx;
  1078. .text1 {
  1079. color: rgb(102, 102, 102);
  1080. }
  1081. .text2 {
  1082. float: right;
  1083. font-weight: 700;
  1084. }
  1085. }
  1086. }
  1087. #infos {
  1088. display: none;
  1089. }
  1090. .page_item_infos {
  1091. padding-bottom: 20rpx;
  1092. border-bottom: 2rpx dashed #e5e9ed;
  1093. .page_item_info2 {
  1094. text-align: left;
  1095. line-height: 60rpx;
  1096. font-size: 32rpx;
  1097. padding-left: 16rpx;
  1098. .page_item_foot_text {
  1099. height: 48rpx;
  1100. font-size: 32rpx;
  1101. line-height: 48rpx;
  1102. margin-bottom: 20rpx;
  1103. .text1 {
  1104. color: rgb(102, 102, 102);
  1105. }
  1106. .text2 {
  1107. float: right;
  1108. font-weight: 700;
  1109. }
  1110. }
  1111. }
  1112. }
  1113. }
  1114. }
  1115. .foot_btn2 {
  1116. position: fixed;
  1117. bottom: 0;
  1118. right: 20rpx;
  1119. left: 20rpx;
  1120. line-height: 66rpx;
  1121. height: 100rpx;
  1122. border-top: 2rpx solid #e5e9ed;
  1123. background: #f9fafb;
  1124. display: flex;
  1125. .btn1,
  1126. .btn2 {
  1127. height: 66rpx;
  1128. flex: 1;
  1129. margin: 0 2%;
  1130. background-image: linear-gradient(to right, #72c172, #3bb197);
  1131. color: #fff;
  1132. border-radius: 8rpx;
  1133. font-size: 32rpx;
  1134. margin-top: 16rpx;
  1135. text-align: center;
  1136. }
  1137. }
  1138. .foot_btn1 {
  1139. position: fixed;
  1140. bottom: 0;
  1141. right: 20rpx;
  1142. left: 20rpx;
  1143. line-height: 66rpx;
  1144. height: 100rpx;
  1145. border-top: 2rpx solid #e5e9ed;
  1146. background: #f9fafb;
  1147. text-align: center;
  1148. .btn3 {
  1149. height: 66rpx;
  1150. width: 100%;
  1151. background-image: linear-gradient(to right, #72c172, #3bb197);
  1152. color: #fff;
  1153. border-radius: 8rpx;
  1154. font-size: 32rpx;
  1155. margin-top: 16rpx;
  1156. }
  1157. }
  1158. }
  1159. }
  1160. </style>