scanning_all.vue 42 KB

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