scanning_Result.vue 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434
  1. <template>
  2. <view class="Scanning_Result">
  3. <view class="Scanning_top" v-if="res.status == 200">
  4. <view class="Scanning_top_icon">
  5. <view v-if="type == 'specimenPlan' || type == 'specimen'">
  6. <view class="red fweight speNum"> {{ speNum }} </view>
  7. </view>
  8. <text v-else class="cubeic-ok newicon newicon-duigou"></text>
  9. </view>
  10. <view class="Scanning_top_text">
  11. <view class="text1"> 操作成功 </view>
  12. <view class="success_tips" v-if="type == 'inspect' || type == 'patientTransport'">
  13. (请您评估患者的意识状况、生命体征、配合程度,如有异常请及时联系护士!)
  14. </view>
  15. </view>
  16. </view>
  17. <view class="Scanning_top" v-if="res.status == 11111">
  18. <view class="Scanning_top_icon">
  19. <text class="cubeic-close newicon newicon-shibai"></text>
  20. </view>
  21. <view class="Scanning_top_text">
  22. <view class="text1" style="color: red;">操作失败</view>
  23. </view>
  24. </view>
  25. <view class="Scanning_top" v-if="(res.status != 200 && res.status != 11111)">
  26. <view class="Scanning_top_icon">
  27. <text class="cubeic-close newicon newicon-shibai"></text>
  28. </view>
  29. <view class="Scanning_top_text">
  30. <view class="text1"> 操作失败 </view>
  31. <view class="text1 f30" v-if="queryObj.qrcode !== undefined"> 扫描内容:{{queryObj.qrcode}} </view>
  32. </view>
  33. </view>
  34. <view class="Scanning_cont spe" v-if="
  35. (res.status == 200 && type == 'specimenPlan') ||
  36. (res.status == 200 && type == 'specimen')
  37. ">
  38. <view class="df">
  39. <view class="width-100">编 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 码:</view>
  40. <view>
  41. <text class="red">{{infoDATA.urgent==1?'急':''}}</text>
  42. <text class="mar-le">{{infoDATA.scode}} </text>
  43. </view>
  44. <view class="po-ab">{{infoDATA.speState && infoDATA.speState.name}}</view>
  45. </view>
  46. <view class="df"><view class="width-100">检验项目:</view> {{ infoDATA.specimenDesc || "-" }}</view>
  47. <view class="df"><view class="width-100">类 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 型:</view>{{ infoDATA.stype.name }} <text v-if="infoDATA.tubeType">、</text> {{infoDATA.tubeType && infoDATA.tubeType.name}}</view>
  48. <view class="df">
  49. <view class="width-100">科 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 室:</view>
  50. {{ infoDATA.sickRoom ? infoDATA.sickRoom.dept : "" }}
  51. <text class="newicon newicon-arrow-right-full"></text>
  52. <text :class="{ red: isEndDeptRedShow }">{{ infoDATA.checkDept ? infoDATA.checkDept.dept : "" }}</text>
  53. </view>
  54. <view class="df"><view class="width-100">患者姓名:</view>{{ infoDATA.patientName}}({{infoDATA.bedNum}})</view>
  55. <view class="df"><view class="width-100">住院号:</view>{{ infoDATA.residenceNo || '-' }}</view>
  56. </view>
  57. <view class="Scanning_cont spe" v-if="
  58. (res.status == 11111 && type == 'specimenPlan') ||
  59. (res.status == 11111 && type == 'specimen')
  60. ">
  61. <view class="df"><view class="width-100">编码:</view> <text class="red">{{infoDATA.urgent==1?'急':''}}</text> {{infoDATA.scode}} {{infoDATA.speState && infoDATA.speState.name}}</view>
  62. <view class="df"><view class="width-100">检验项目:</view> {{ infoDATA.specimenDesc || "-" }}</view>
  63. <view class="df"><view class="width-100">类型:</view>{{ infoDATA.stype.name }} <text v-if="infoDATA.tubeType">、</text> {{infoDATA.tubeType && infoDATA.tubeType.name}}</view>
  64. <view class="df">
  65. <view class="width-100">科室:</view>
  66. {{ infoDATA.sickRoom ? infoDATA.sickRoom.dept : "" }}
  67. <text class="newicon newicon-arrow-right-full"></text>
  68. <text :class="{ red: isEndDeptRedShow }">{{ infoDATA.checkDept ? infoDATA.checkDept.dept : "" }}</text>
  69. </view>
  70. <view class="df"><view class="width-100">患者姓名:</view>{{ infoDATA.patientName}}({{infoDATA.bedNum}})</view>
  71. <view class="df"><view class="width-100">住院号:</view>{{ infoDATA.residenceNo || '-' }}</view>
  72. </view>
  73. <view class="Scanning_cont" v-if="
  74. (res.status == 200 && type == 'inspect') || type == 'patientTransport'
  75. ">
  76. <view class="df" v-if="res.patient"> <view class="width-100">患者姓名:</view> {{ res.patient || "-" }} </view>
  77. <view class="df" v-if="res.residenceNo">
  78. <view class="width-100">住院号:</view> {{ res.residenceNo || "-" }}
  79. </view>
  80. <view class="df" v-if="res.deptName">
  81. <view class="width-100">住院科室:</view> {{ res.deptName !== "undefined" ? res.deptName : "-" }}
  82. </view>
  83. <view class="df" v-if="res.bedNum">
  84. <view class="width-100">床号:</view> {{ res.bedNum !== "undefined" ? res.bedNum : "-" }}
  85. </view>
  86. <view class="df" v-if="res.data">
  87. <view class="width-100">检查项目:</view>
  88. <text v-for="(data, i) in res.data" :key="i">{{
  89. data.inspectName
  90. }}</text>
  91. </view>
  92. <view v-if="
  93. res.status == 200 &&
  94. infoType != 'ins-zxz-1' &&
  95. infoType != 'ins-dsd-1' &&
  96. infoType != 'ins-ddd-1' &&
  97. infoType != 'trans-ddd-1' &&
  98. infoType != 'trans-dsd-1'
  99. ">
  100. {{ res.msg || "" }}
  101. </view>
  102. <view v-if="infoType == 'trans-dsd-1' && res.status == 200">
  103. 工单已完成
  104. </view>
  105. <view v-if="infoType == 'ins-dsd-1' && res.status == 200">
  106. 工单已完成。
  107. </view>
  108. <!-- 半程陪检 -->
  109. <view v-if="infoDATA.type == 'ins-half-ok' && res.status == 200">
  110. 已到达检查科室,工单已完成。
  111. </view>
  112. </view>
  113. <view class="Scanning_cont" v-if="res.status == 200 && (type == 'drugsBag' || type == 'jPBag')">
  114. <view class="df"> <view class="width-100">药包类型:</view> {{(infoDATA.packType && infoDATA.packType !== 0) ? DRUGSBAG_TYPE[infoDATA.packType] : "-"}} </view>
  115. <view class="df" v-if="type == 'drugsBag'"> <view class="width-100">药包编码:</view> #{{ infoDATA.packid }} </view>
  116. <view class="df"
  117. v-if="type == 'drugsBag' && accountObj && (queryObj.type1 === 'drug-ddd-2' || queryObj.type1 === 'drug-dsd-2')">
  118. <view class="width-100">交接人工号:</view> {{ accountObj.account }} </view>
  119. <view class="df"
  120. v-if="type == 'drugsBag' && accountObj && (queryObj.type1 === 'drug-ddd-2' || queryObj.type1 === 'drug-dsd-2')">
  121. <view class="width-100">交接人姓名:</view> {{ accountObj.accountName }} </view>
  122. <view class="df"v-if="type == 'jPBag'">
  123. <view class="width-100">静配药包编码:</view> #{{ infoDATA.packid }}
  124. </view>
  125. <view class="df"> <view class="width-100">所属科室:</view> {{ infoDATA.target.dept || "-" }} </view>
  126. <view v-if="infoType === 'drug-dsd-2' || infoType === 'jp-dsd-2'">
  127. 工单已完成。
  128. </view>
  129. <view class="red"> 如果您当前科室还有药包需要扫描,请点击“继续扫描”! </view>
  130. </view>
  131. <view class="Scanning_cont" v-if="res.status != 200">
  132. <view class="Scanning_cont_center" v-if="res.status != 11111">
  133. {{ res.msg === "undefined" || !res.msg ? "" : res.msg }}
  134. </view>
  135. </view>
  136. <view class="foot_btn_spe" v-if="
  137. (type == 'specimen' && isKs != '1') ||
  138. (type == 'specimenPlan' && isKs != '1')
  139. ">
  140. <view class="btn1" @click="Scanning_again()"> 继续扫描 </view>
  141. <view class="btn3" @click="hand_again()">手动录入</view>
  142. <view class="btn3" @click="getNoScanSpecimen(false)">未扫描标本</view>
  143. <view class="btn3" @click="getNoScanSpecimen(true)">已扫描标本</view>
  144. <view class="btn3" @click="Scanning_complete(dataId)"> 完成扫描 </view>
  145. <view class="btn3" v-if="speCollectLimit==1" @click="configuration(dataId)"> 配置收取 </view>
  146. </view>
  147. <view class="foot_btn" v-if="
  148. (type != 'specimenPlan' &&
  149. type != 'specimen' &&
  150. type != 'drugsBag' &&
  151. type != 'jPBag' &&
  152. (type != 'inspect') & (type != 'patientTransport')) ||
  153. (queryObj.status == 200 &&
  154. type == 'drugsBag' &&
  155. infoType == 'drug-ddd-2') ||
  156. (queryObj.status == 200 &&
  157. type == 'drugsBag' &&
  158. infoType == 'drug-dsd-2') ||
  159. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-ddd-2') ||
  160. (queryObj.status == 200 && type == 'jPBag' && infoType == 'jp-dsd-2') ||
  161. (queryObj.status == 200 && type == 'inspect') ||
  162. (queryObj.status == 200 && type == 'patientTransport')
  163. ">
  164. <view class="btn3" @click="Scanning_again()" v-if="type == 'drugsBag'||type == 'jPBag'"> 继续扫描 </view>
  165. <view class="btn3" @click="showAlert(dataId)"> 返回 </view>
  166. </view>
  167. <view class="foot_btn" v-if="
  168. (isKs != '1' &&
  169. queryObj.status != 200 &&
  170. type == 'drugsBag' &&
  171. infoType == 'drug-ddd-2') ||
  172. (isKs != '1' &&
  173. queryObj.status != 200 &&
  174. type == 'drugsBag' &&
  175. infoType == 'drug-dsd-2') ||
  176. (isKs != '1' &&
  177. queryObj.status != 200 &&
  178. type == 'jPBag' &&
  179. infoType == 'jp-ddd-2') ||
  180. (isKs != '1' &&
  181. queryObj.status != 200 &&
  182. type == 'jPBag' &&
  183. infoType == 'jp-dsd-2') ||
  184. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  185. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  186. ">
  187. <view class="btn3" @click="Scanning_again()"> 继续扫描 </view>
  188. <view class="btn3" @click="showAlert()" v-if="type == 'drugsBag'"> 返回 </view>
  189. <view class="btn3" @click="photograph(queryObj, { DEPTCode, DEPT, infoType })" v-if="
  190. (isKs != '1' && queryObj.status != 200 && type == 'inspect') ||
  191. (isKs != '1' && queryObj.status != 200 && type == 'patientTransport')
  192. ">
  193. 拍照
  194. </view>
  195. </view>
  196. <view class="foot_btn" v-if="
  197. infoType == 'spe-ddd-1' ||
  198. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-2') ||
  199. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-1') ||
  200. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-ddd-2') ||
  201. (isKs == '1' && queryObj.status != 200 && infoType == 'spe-dsd-3') ||
  202. (isKs == '1' &&
  203. queryObj.status != 200 &&
  204. infoType == 'plan-spe-ddd-1') ||
  205. (isKs == '1' &&
  206. queryObj.status != 200 &&
  207. infoType == 'plan-spe-ddd-2') ||
  208. (isKs == '1' &&
  209. queryObj.status != 200 &&
  210. infoType == 'plan-spe-dsd-1') ||
  211. (isKs == '1' &&
  212. queryObj.status != 200 &&
  213. infoType == 'plan-spe-dsd-2') ||
  214. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-2') ||
  215. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-2') ||
  216. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-2') ||
  217. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-2') ||
  218. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-ddd-1') ||
  219. (isKs == '1' && queryObj.status != 200 && infoType == 'drug-dsd-1') ||
  220. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-ddd-1') ||
  221. (isKs == '1' && queryObj.status != 200 && infoType == 'jp-dsd-1') ||
  222. (isKs == '1' &&
  223. queryObj.status != 200 &&
  224. infoType == 'plan-spe-dsd-3') ||
  225. (isKs == '1' &&
  226. queryObj.status != 200 &&
  227. type == 'inspect' &&
  228. queryObj.type1 === 'undefined') ||
  229. (isKs == '1' &&
  230. queryObj.status != 200 &&
  231. type == 'patientTransport' &&
  232. queryObj.type1 === 'undefined')
  233. ">
  234. <view class="btn3" @click="showAlert(dataId)"> 返回 </view>
  235. </view>
  236. <view class="foot_btn" v-if="
  237. (isKs == '1' &&
  238. queryObj.status != 200 &&
  239. type == 'inspect' &&
  240. queryObj.type1 === 'ins-zxz-1') ||
  241. (isKs == '1' &&
  242. queryObj.status != 200 &&
  243. type == 'inspect' &&
  244. queryObj.type1 === 'ins-dsd-1') ||
  245. (isKs == '1' &&
  246. queryObj.status != 200 &&
  247. type == 'patientTransport' &&
  248. queryObj.type1 === 'trans-dsd-1')
  249. ">
  250. <view class="btn1" @click="showAlert(dataId)"> 返回 </view>
  251. <view class="btn2" @click="goToRight(dataId)"> 继续执行工单 </view>
  252. </view>
  253. <!-- 弹窗 -->
  254. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  255. @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
  256. <!-- 弹窗 -->
  257. <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  258. :radioItem="models1.radioItem" @ok="ok1" @radioChange="radioChange1" @cancel="cancel1" :operate="models1.operate">
  259. </showModel>
  260. <!-- 弹窗 -->
  261. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  262. @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate">
  263. </showModel>
  264. <!-- 手动查询标本弹窗 -->
  265. <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
  266. @ok="speOk" @cancel="speCancel">
  267. </handViewSpecimen>
  268. <!-- 调查问卷二维码 -->
  269. <questionCode v-if="isQuestionModel" :orderId="dataId" @know="isQuestionModel = false"></questionCode>
  270. <!-- PDA扫描 -->
  271. <scanner></scanner>
  272. <!-- 标本扫描拦截 -->
  273. <!-- <errorModel v-show="errorModal" ref="model11" :errorModal="errorModal" :speDATA="speDATA" @cancel="cancelError" @confirm="confirmError($event)"></errorModel> -->
  274. </view>
  275. </template>
  276. <script>
  277. import scanner from "../../components/scanner/scanner.vue";
  278. import showModel from "../../components/showModel/showModel.vue";
  279. import errorModel from "../../components/errorModel/errorModel.vue";
  280. import questionCode from "../../components/questionCode/questionCode.vue";
  281. import {
  282. get,
  283. post,
  284. SM,
  285. webHandle
  286. } from "../../http/http.js";
  287. import {
  288. photographTool
  289. } from "../../tools/photograph.js";
  290. import {
  291. DRUGSBAG_TYPE
  292. } from '../../tools/enum.drugsbagType.js';
  293. export default {
  294. components:{
  295. questionCode,
  296. scanner,
  297. errorModel
  298. },
  299. data() {
  300. return {
  301. // 终点科室标红
  302. isEndDeptRedShow: false,
  303. isEndDeptRed: false,
  304. // 调研二维码
  305. isQuestionModel:false,
  306. DRUGSBAG_TYPE,
  307. currentCode: '', //当前小扫描的科室二维码
  308. // 手动查询标本弹窗model
  309. speModels: {
  310. disjunctor: false,
  311. },
  312. deptId: undefined,
  313. handover: undefined,
  314. SMFlag: true,
  315. // 交接人信息
  316. accountObj: undefined,
  317. // 完成扫描的id
  318. wcId: "",
  319. wcFlag: false,
  320. // 弹窗model
  321. models: {
  322. disjunctor: false,
  323. },
  324. // 单选框弹窗model1
  325. models1: {
  326. disjunctor: false,
  327. },
  328. // 完成扫描弹窗model1
  329. models2: {
  330. disjunctor: false,
  331. },
  332. isKs: "", //是否科室签到 1
  333. infoDATA: {},
  334. res: {},
  335. infoType: "",
  336. DEPTCode: "",
  337. RESData: {},
  338. DEPT: "",
  339. dataId: "",
  340. type: "",
  341. model: {},
  342. speNum: 0,
  343. queryObj: {}, //路由传递过来的数据
  344. selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
  345. gotoFlag: true,
  346. content: "",
  347. taskTypeId:"",
  348. speCollectLimit:null,
  349. errorModal:null,
  350. speDATA:null,
  351. interceptData:null,
  352. intercept:null,
  353. num: 0,
  354. isShow:null
  355. };
  356. },
  357. methods: {
  358. // 手动查询标本-确认
  359. speOk(data) {
  360. console.log(data);
  361. if (!data.id) {
  362. //没有查询到标本
  363. uni.showModal({
  364. title: '提示',
  365. content: "没有查询到标本!",
  366. showCancel: false,
  367. success: function(res) {
  368. if (res.confirm) {
  369. console.log('用户点击确定');
  370. } else if (res.cancel) {
  371. console.log('用户点击取消');
  372. }
  373. }
  374. });
  375. return;
  376. }
  377. this.speModels.disjunctor = false;
  378. this.hand_scanning_common(data.scode, 'hand');
  379. },
  380. // 手动查询标本-取消
  381. speCancel() {
  382. this.speModels.disjunctor = false;
  383. },
  384. // 手动查询标本弹窗
  385. showHandViewSpecimen() {
  386. this.speModels = {
  387. title: '填写标本编码',
  388. disjunctor: true,
  389. }
  390. },
  391. // 手动录入标本
  392. hand_again() {
  393. this.showHandViewSpecimen();
  394. },
  395. // 手动输入标本和扫码公共方法
  396. hand_scanning_common(ress1, type) {
  397. // ----------------
  398. uni.showLoading({
  399. title: "加载中",
  400. mask: true,
  401. });
  402. //检验二维码的有效性
  403. post("/dept/scanning", {
  404. content: ress1,
  405. }).then((result) => {
  406. this.SMFlag = true;
  407. this.currentCode = result.code;
  408. if (result.state == 200 || result.state == 201) {
  409. let codes = result.code;
  410. if (codes) {
  411. let speCode = codes;
  412. let data = {
  413. code: speCode,
  414. type: this.queryObj.type1,
  415. deptCode: this.DEPTCode,
  416. ids: [],
  417. speVerifyType:null,
  418. addConfig:null
  419. };
  420. if(this.speDATA){
  421. data.speVerifyType = this.speDATA.speVerifyType
  422. }else{
  423. delete data.speVerifyType
  424. }
  425. if(this.interceptData && this.interceptData.addConfig){
  426. data.addConfig = 1
  427. }else{
  428. delete data.addConfig
  429. }
  430. data.ids.push(this.dataId);
  431. let postType = "";
  432. if (this.type == "jPBag" || this.type == "drugsBag") {
  433. postType = "handleDrugsAndJp";
  434. if(this.type == "drugsBag"){
  435. delete data.ids;
  436. }
  437. data.deptId = this.deptId;
  438. data.handover = this.handover;
  439. }
  440. if (this.type == "specimen") {
  441. data["speCode"] = data.code;
  442. delete data.code;
  443. postType = "handleSpes";
  444. }
  445. if (this.type == "specimenPlan") {
  446. data["speCode"] = data.code;
  447. delete data.code;
  448. postType = "handlePlanSpes";
  449. }
  450. if (this.type == "inspect") {
  451. postType = "handleIns";
  452. }
  453. if (this.type == "patientTransport") {
  454. postType = "handleTrans";
  455. }
  456. post("/workerOrder/" + postType, data).then((ress) => {
  457. uni.hideLoading();
  458. this.speDATA = null
  459. this.interceptData = null
  460. if (ress.status == 200 || ress.status == 11111) {
  461. //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
  462. if ((this.type == "specimenPlan" || this.type == "specimen") && ress.status != 11111) {
  463. this.getPageConfigSpecimen((flag, type, ress) => {
  464. // if(flag && !this.isShow){
  465. setTimeout(()=>{
  466. if (type === 'scan') {
  467. // #ifdef H5
  468. this.Scanning_again();
  469. // #endif
  470. }
  471. },500)
  472. // }
  473. if(ress){
  474. this.infoDATA = ress.data;
  475. this.speNum = ress.specimenCount;
  476. // 标本拦截收取参数
  477. let sessData = `type=${
  478. this.queryObj.type
  479. }&type1=${
  480. this.queryObj.type1
  481. }&infoData=${encodeURIComponent(
  482. JSON.stringify(ress.data)
  483. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  484. this.queryObj.deptCode
  485. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}&isEndDeptRed=${this.isEndDeptRed}`
  486. uni.setStorageSync('gdData', JSON.stringify(sessData))
  487. uni.redirectTo({
  488. url: `../scanning_Result/scanning_Result?type=${
  489. this.queryObj.type
  490. }&type1=${
  491. this.queryObj.type1
  492. }&infoData=${encodeURIComponent(
  493. JSON.stringify(ress.data)
  494. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  495. this.queryObj.deptCode
  496. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}&isEndDeptRed=${this.isEndDeptRed}`,
  497. });
  498. }
  499. }, type, ress.data, ress);
  500. return;
  501. }
  502. if (this.type == "specimenPlan" || this.type == "specimen") {
  503. this.infoDATA = ress.data;
  504. this.speNum = ress.specimenCount;
  505. uni.redirectTo({
  506. url: `../scanning_Result/scanning_Result?type=${
  507. this.queryObj.type
  508. }&type1=${
  509. this.queryObj.type1
  510. }&infoData=${encodeURIComponent(
  511. JSON.stringify(ress.data)
  512. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  513. this.queryObj.deptCode
  514. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}`,
  515. });
  516. } else if (
  517. this.type == "inspect" ||
  518. this.type == "patientTransport"
  519. ) {
  520. if(this.type == "patientTransport" && this.queryObj.type1 == 'trans-ddd-1'){
  521. // 门诊服务点,有orderList
  522. if(ress.orderList){
  523. uni.navigateTo({
  524. url: `/pages/outpatient/outpatientStartSignIn/outpatientStartSignIn?model=${encodeURIComponent(JSON.stringify(ress))}`,
  525. });
  526. }else{
  527. uni.redirectTo({
  528. url: `../scanning_Result/scanning_Result?type=${
  529. this.queryObj.type
  530. }&type1=${
  531. this.queryObj.type1
  532. }&infoData=${encodeURIComponent(
  533. JSON.stringify(ress.data)
  534. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  535. this.queryObj.deptCode
  536. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  537. JSON.stringify(ress)
  538. )}&patient=${ress.patient}&patientCode=${
  539. ress.patientCode
  540. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  541. });
  542. }
  543. }else if(this.type == "patientTransport" && this.queryObj.type1 == 'trans-dsd-1'){
  544. // 门诊服务点,有orderList
  545. if(ress.orderList){
  546. uni.navigateTo({
  547. url: `/pages/outpatient/outpatientEndSignIn/outpatientEndSignIn?model=${encodeURIComponent(JSON.stringify(ress))}`,
  548. });
  549. }else{
  550. uni.redirectTo({
  551. url: `../scanning_Result/scanning_Result?type=${
  552. this.queryObj.type
  553. }&type1=${
  554. this.queryObj.type1
  555. }&infoData=${encodeURIComponent(
  556. JSON.stringify(ress.data)
  557. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  558. this.queryObj.deptCode
  559. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  560. JSON.stringify(ress)
  561. )}&patient=${ress.patient}&patientCode=${
  562. ress.patientCode
  563. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  564. });
  565. }
  566. }else{
  567. uni.redirectTo({
  568. url: `../scanning_Result/scanning_Result?type=${
  569. this.queryObj.type
  570. }&type1=${
  571. this.queryObj.type1
  572. }&infoData=${encodeURIComponent(
  573. JSON.stringify(ress.data)
  574. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  575. this.queryObj.deptCode
  576. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(
  577. JSON.stringify(ress)
  578. )}&patient=${ress.patient}&patientCode=${
  579. ress.patientCode
  580. }&deptName=${ress.deptName}&bedNum=${ress.bedNum}`,
  581. });
  582. }
  583. } else {
  584. uni.redirectTo({
  585. url: `../scanning_Result/scanning_Result?type=${
  586. this.queryObj.type
  587. }&type1=${
  588. this.queryObj.type1
  589. }&infoData=${encodeURIComponent(
  590. JSON.stringify(ress.data)
  591. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  592. this.queryObj.deptCode
  593. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}`,
  594. });
  595. }
  596. } else if (ress.status==513){
  597. uni.navigateTo({
  598. url: `../speError/speError?type=${
  599. this.queryObj.type
  600. }&type1=${
  601. this.queryObj.type1
  602. }&infoData=${encodeURIComponent(
  603. JSON.stringify(ress.data)
  604. )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
  605. this.queryObj.deptCode
  606. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=${type}&isEndDeptRed=${this.isEndDeptRed}`,
  607. });
  608. } else if(ress.status==10004){
  609. uni.showToast({
  610. icon: "none",
  611. duration: 3000,
  612. title: ress.msg +','+ `扫描内容:${data.speCode}`,
  613. });
  614. }else{
  615. uni.redirectTo({
  616. url: `../scanning_Result/scanning_Result?type=${
  617. this.queryObj.type
  618. }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
  619. ress.msg
  620. }&deptCode=${this.queryObj.deptCode}&dept=${
  621. this.queryObj.dept
  622. }&id=${this.dataId}&model=${encodeURIComponent(
  623. JSON.stringify(this.infoDATA)
  624. )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=${type}&qrcode=${this.currentCode}`,
  625. });
  626. }
  627. });
  628. } else {
  629. uni.hideLoading();
  630. }
  631. } else {
  632. uni.hideLoading();
  633. uni.showToast({
  634. icon: "none",
  635. title: result.info || "接口获取数据失败!",
  636. });
  637. }
  638. }).catch(err =>{
  639. this.SMFlag = true;
  640. });
  641. // ------------------------------
  642. },
  643. // 取消拦截
  644. // cancelError(){
  645. // this.errorModal = false
  646. // this.interceptData = null
  647. // this.speDATA = null
  648. // },
  649. // // 确定标本拦截
  650. // confirmError(e){
  651. // this.errorModal = false
  652. // this.interceptData = e
  653. // this.hand_scanning_common(this.interceptData.code, 'scan')
  654. // },
  655. // 查看未扫描标本
  656. // isScan true已扫描标本,false未扫描标本
  657. getNoScanSpecimen(isScan) {
  658. if (!this.gotoFlag) {
  659. return;
  660. }
  661. this.gotoFlag = false;
  662. if(isScan){
  663. uni.navigateTo({
  664. url: `../noScanSpecimen/noScanSpecimen?deptName=${this.queryObj.dept}&workOrderId=${encodeURIComponent(JSON.stringify([this.queryObj.id]))}&deptCode=${this.queryObj.deptCode}&isScan=1`,
  665. });
  666. }else{
  667. uni.navigateTo({
  668. url: `../noScanSpecimen/noScanSpecimen?deptName=${this.queryObj.dept}&workOrderId=${encodeURIComponent(JSON.stringify([this.queryObj.id]))}&deptCode=${this.queryObj.deptCode}`,
  669. });
  670. }
  671. },
  672. // 拍照
  673. photograph(data, obj) {
  674. photographTool(data, obj);
  675. },
  676. // 继续扫描
  677. Scanning_again() {
  678. // this.hand_scanning_common('250523620572@_1', 'scan')
  679. if (!this.SMFlag) {
  680. return;
  681. }
  682. this.SMFlag = false;
  683. SM().then((ress1) => {
  684. this.hand_scanning_common(ress1, 'scan');
  685. }).catch(err => {
  686. this.SMFlag = true;
  687. });
  688. },
  689. // pda扫描
  690. pdaChange(content){
  691. content = content.replace('\n','')
  692. this.hand_scanning_common(content, 'scan');
  693. },
  694. // 正常完成扫描
  695. overFinish() {
  696. let data = {
  697. type: this.queryObj.type1,
  698. ids: [this.wcId],
  699. };
  700. //只要是标本轮巡1对多或者多对多
  701. // plan-spe-dsd-2 1对多
  702. // plan-spe-dsd-3 多对多
  703. if (
  704. this.queryObj.type1 === "plan-spe-ddd-2" ||
  705. this.queryObj.type1 === "plan-spe-dsd-2" ||
  706. this.queryObj.type1 === "plan-spe-dsd-3"
  707. ) {
  708. post("/workerOrder/finishPlanSpes", data).then((res) => {
  709. // uni.hideLoading()
  710. if (res.status == 200) {
  711. this.models2 = {
  712. disjunctor: true,
  713. title: "提示",
  714. content: `完成扫描成功`,
  715. icon: "success",
  716. operate: {
  717. know: "返回",
  718. },
  719. };
  720. } else {
  721. uni.showToast({
  722. icon: "none",
  723. title: res.msg || "接口获取数据失败!",
  724. });
  725. }
  726. });
  727. } else {
  728. post("/workerOrder/finishSpes", data).then((res) => {
  729. // uni.hideLoading()
  730. if (res.status == 200) {
  731. uni.navigateTo({
  732. url: "../receiptpage/receiptpage",
  733. });
  734. } else {
  735. uni.showToast({
  736. icon: "none",
  737. title: res.msg || "接口获取数据失败!",
  738. });
  739. }
  740. });
  741. }
  742. },
  743. // 确定
  744. ok() {
  745. this.models.disjunctor = false;
  746. let postData = {
  747. ids: [this.queryObj.id],
  748. sign: true,
  749. deptQrCode: this.queryObj.deptCode
  750. };
  751. uni.showLoading({
  752. title: '加载中',
  753. mask: true
  754. });
  755. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  756. uni.hideLoading();
  757. if (ress.status == 200) {
  758. if (this.wcFlag) {
  759. //正常完成扫描
  760. this.overFinish()
  761. } else {
  762. this.gotoOver();
  763. }
  764. } else if (ress.status == 1000035) {
  765. let content = '';
  766. if (this.queryObj.type1 === 'spe-ddd-2' || this.queryObj.type1 === 'plan-spe-ddd-2') {
  767. //待到达
  768. content =
  769. `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
  770. } else {
  771. //待送达
  772. this.content =
  773. `本工单已签到<strong class="red">${ress.scanSet?ress.scanSet.join('、'):''}</strong>,剩余需签到科室<strong class="red">${ress.notScanSet?ress.notScanSet.join('、'):''}</strong>,总签收<strong class="red">${ress.totalAcceptance}</strong>只,剩余<strong class="red">${ress.notAcceptance}</strong>只未签收,您确定完成工单吗?`;
  774. content =
  775. `您在<strong class="red">${ress.deptName}</strong>检验科扫描了<strong class="red">${ress.deptScanNum}</strong>个标本,还需扫描<strong class="red">${ress.deptNotScanNum}</strong>标本。`;
  776. }
  777. // 取消弹窗 2022年10月10日
  778. this.ok2();
  779. // this.models2 = {
  780. // disjunctor: true,
  781. // title: "提示",
  782. // content,
  783. // icon: "warn",
  784. // operate: {
  785. // ok: "确定",
  786. // cancel: "取消",
  787. // },
  788. // };
  789. } else {
  790. uni.showToast({
  791. icon: "none",
  792. title: ress.msg || "接口获取数据失败!",
  793. });
  794. }
  795. })
  796. },
  797. // 取消
  798. cancel() {
  799. this.models.disjunctor = false;
  800. },
  801. // 确定
  802. ok2() {
  803. this.models2.disjunctor = false;
  804. let postData = {
  805. ids: [this.queryObj.id],
  806. deptQrCode: this.queryObj.deptCode
  807. };
  808. uni.showLoading({
  809. title: '加载中',
  810. mask: true
  811. });
  812. post("/workerOrder/expectedAndActual", postData).then((ress) => {
  813. uni.hideLoading();
  814. if (ress.status == 200) {
  815. if (this.wcFlag) {
  816. this.overFinish()
  817. } else {
  818. this.gotoOver();
  819. }
  820. } else {
  821. uni.showToast({
  822. icon: "none",
  823. title: ress.msg || "接口获取数据失败!",
  824. });
  825. }
  826. })
  827. },
  828. // 取消
  829. cancel2() {
  830. this.models2.disjunctor = false;
  831. },
  832. know2() {
  833. this.models2.disjunctor = false;
  834. uni.navigateTo({
  835. url: "../receiptpage/receiptpage",
  836. });
  837. },
  838. // 配置收取
  839. configuration(id){
  840. uni.navigateTo({
  841. url: `../speConfigurationGather/speConfigurationGather?id=${id}`
  842. });
  843. },
  844. // 完成扫描
  845. Scanning_complete(id) {
  846. // 如果是标本配送和标本轮巡,则进入标本核对页面
  847. if((this.type === 'specimen' || this.type === 'specimenPlan') && this.queryObj.type1.includes('ddd')){
  848. uni.navigateTo({
  849. url: `../checkAfterScanning/checkAfterScanning?id=${id}&type=${this.queryObj.type}&type1=${this.queryObj.type1}&dept=${this.queryObj.dept}&deptId=${this.queryObj.deptId}&deptCode=${this.queryObj.deptCode}&speNum=${this.speNum}&content=${this.content}`,
  850. });
  851. return;
  852. }
  853. this.wcId = id;
  854. if (
  855. this.queryObj.type1 == "plan-spe-ddd-2" ||
  856. this.queryObj.type1 == "spe-ddd-2"
  857. ) {
  858. this.wcFlag = true;
  859. this.models = {
  860. disjunctor: true,
  861. title: "提示",
  862. content: "是否确定标本已扫描完成?",
  863. icon: "warn",
  864. operate: {
  865. ok: "确定",
  866. cancel: "取消",
  867. },
  868. };
  869. } else if (
  870. this.queryObj.type1 == "plan-spe-dsd-2" ||
  871. this.queryObj.type1 == "plan-spe-dsd-3" ||
  872. this.queryObj.type1 == "spe-dsd-2" ||
  873. this.queryObj.type1 == "spe-dsd-3"
  874. ) {
  875. this.wcFlag = false;
  876. this.models = {
  877. disjunctor: true,
  878. title: "提示",
  879. content: "是否确定标本已扫描完成?",
  880. icon: "warn",
  881. operate: {
  882. ok: "确定",
  883. cancel: "取消",
  884. },
  885. };
  886. } else {
  887. this.gotoOver();
  888. }
  889. },
  890. // 跳转完成工单页面
  891. gotoOver() {
  892. if(this.queryObj.type === 'specimenPlan'){
  893. uni.navigateTo({
  894. url: `../specimenCheckingEnd/specimenCheckingEnd?type=${this.queryObj.type}&type1=${
  895. this.queryObj.type1
  896. }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
  897. this.queryObj.deptCode
  898. }&dept=${this.queryObj.dept}&speNum=${this.speNum}&content=${this.content}`,
  899. });
  900. }else{
  901. uni.navigateTo({
  902. url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
  903. this.queryObj.type1
  904. }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
  905. this.queryObj.deptCode
  906. }&dept=${this.queryObj.dept}&speNum=${this.speNum}&content=${this.content}`,
  907. });
  908. }
  909. },
  910. // 继续执行工单,当扫错科室码的时候,直接跳过,默默执行正确的科室码
  911. goToRight(id) {
  912. // flag 为1时查检查科室,flag为2时查终点科室
  913. let flag;
  914. // 患者转科,患者陪检
  915. if (
  916. this.queryObj.type1 == "trans-dsd-1" ||
  917. this.queryObj.type1 == "ins-dsd-1"
  918. ) {
  919. flag = 2;
  920. }
  921. if (this.queryObj.type1 == "ins-zxz-1") {
  922. flag = 1;
  923. }
  924. let postData = {
  925. workOrderId: id,
  926. flag: flag,
  927. };
  928. uni.showLoading({
  929. title: "加载中",
  930. mask: true,
  931. });
  932. post("/workerOrder/continueWorkOrder", postData).then((res) => {
  933. uni.hideLoading();
  934. console.log(res);
  935. if (res.state == 200) {
  936. let radioItem = [];
  937. res.data.forEach((item) => {
  938. let flag = radioItem.every(
  939. (item1) => item1.qrcode !== item.qrcode + "__" + item.deptName
  940. ); //如果radioItem里的所有项都与之不重复
  941. if (flag) {
  942. radioItem.push({
  943. qrcode: item.qrcode + "__" + item.deptName,
  944. deptName: item.deptName,
  945. });
  946. }
  947. });
  948. this.models1 = {
  949. disjunctor: true,
  950. title: "请选择正确的科室",
  951. radioItem,
  952. icon: "",
  953. operate: {
  954. ok: "确定",
  955. cancel: "取消",
  956. },
  957. };
  958. } else {
  959. uni.showToast({
  960. icon: "none",
  961. title: res.msg || "接口获取数据失败!",
  962. });
  963. }
  964. });
  965. },
  966. // 选中单选框
  967. radioChange1(item) {
  968. console.log(item);
  969. this.selectRadio = item.split("__");
  970. },
  971. // 确定
  972. ok1() {
  973. this.models1.disjunctor = false;
  974. if (!this.selectRadio.length) {
  975. //默认选中第一项,选中则是选中项
  976. this.selectRadio = [
  977. this.models1.radioItem[0].qrcode.split("__")[0],
  978. this.models1.radioItem[0].deptName,
  979. ];
  980. }
  981. uni.navigateTo({
  982. url: `../scanning_code/scanning_code?type=${this.queryObj.type}&type1=${this.queryObj.type1}&id=${this.queryObj.id}&deptCode=${this.selectRadio[0]}&dept=${this.selectRadio[1]}`,
  983. });
  984. },
  985. // 取消
  986. cancel1() {
  987. this.models1.disjunctor = false;
  988. },
  989. // 返回
  990. showAlert(id) {
  991. uni.navigateTo({
  992. url: "../receiptpage/receiptpage"
  993. });
  994. },
  995. // 获取问卷配置
  996. getQuestionnaireSet(){
  997. uni.showLoading({
  998. title: "加载中",
  999. mask: true,
  1000. });
  1001. const userData = uni.getStorageSync("userData");
  1002. post("/simple/data/fetchDataList/questionnaireConfig",{
  1003. questionnaireConfig:{
  1004. hosId:userData.user.currentHospital.id
  1005. },
  1006. idx:0,
  1007. sum:10
  1008. }).then((res) => {
  1009. uni.hideLoading();
  1010. if (res.status == 200) {
  1011. let data = res.list[0];
  1012. if(data.taskTypeDTOS.length>0 && data.questionnaireDTOS.length>0){
  1013. let isQuestion = data.taskTypeDTOS.find(i=> i.id == this.taskTypeId)
  1014. if(isQuestion){
  1015. this.isQuestionModel = true
  1016. }
  1017. }
  1018. } else {
  1019. uni.showToast({
  1020. icon: "none",
  1021. title: res.msg || "接口获取数据失败!",
  1022. });
  1023. }
  1024. });
  1025. },
  1026. // 页面控制-标本
  1027. getPageConfigSpecimen(fn, type, specimenDTO, ress){
  1028. const userData = uni.getStorageSync("userData");
  1029. console.log('userData', userData);
  1030. console.log('specimenDTO', specimenDTO);
  1031. uni.showLoading({
  1032. title: "加载中",
  1033. mask: true,
  1034. });
  1035. // 查询标本配送业务
  1036. post("/simple/data/fetchDataList/taskType",{
  1037. "idx": 0,
  1038. "sum": 10,
  1039. "taskType": {
  1040. "simpleQuery": true,
  1041. "hosId": {
  1042. "id": userData.user.currentHospital.id
  1043. },
  1044. "associationType": {
  1045. "key": "association_types",
  1046. "value": "specimen"
  1047. }
  1048. }
  1049. }).then((res) => {
  1050. if (res.status == 200) {
  1051. let taskTypeDTO = res.list[0];
  1052. if(taskTypeDTO){
  1053. // 查询业务页面控制-标本
  1054. post("/simple/data/fetchDataList/taskTypeConfig",{
  1055. "idx": 0,
  1056. "sum": 10,
  1057. "taskTypeConfig": {
  1058. taskTypeDTO,
  1059. }
  1060. }).then((res) => {
  1061. uni.hideLoading();
  1062. if (res.status == 200) {
  1063. let data = res.list[0];
  1064. if(data){
  1065. // this.speCollectLimit = data.speCollectLimit;
  1066. let deptNotAlertList = data.deptNotAlertList || [];
  1067. deptNotAlertList = deptNotAlertList.map(v => v.id);
  1068. if(deptNotAlertList.includes(specimenDTO && specimenDTO.checkDept.id)){
  1069. this.isEndDeptRed = true;
  1070. console.log('红色')
  1071. fn(false, type, ress);
  1072. }else{
  1073. this.isEndDeptRed = false;
  1074. fn(true, type, ress);
  1075. }
  1076. console.log('this.isEndDeptRed', this.isEndDeptRed);
  1077. }else{
  1078. this.isEndDeptRed = false;
  1079. fn(true, type, ress);
  1080. }
  1081. } else {
  1082. uni.showToast({
  1083. icon: "none",
  1084. title: res.msg || "接口获取数据失败!",
  1085. });
  1086. }
  1087. });
  1088. }else{
  1089. uni.hideLoading();
  1090. uni.showToast({
  1091. icon: "none",
  1092. title: "未查询到标本配送业务!",
  1093. });
  1094. }
  1095. } else {
  1096. uni.hideLoading();
  1097. uni.showToast({
  1098. icon: "none",
  1099. title: res.msg || "接口获取数据失败!",
  1100. });
  1101. }
  1102. });
  1103. },
  1104. getSys(){
  1105. const userData = uni.getStorageSync("userData");
  1106. console.log('userData', userData);
  1107. // uni.showLoading({
  1108. // title: "加载中",
  1109. // mask: true,
  1110. // });
  1111. // 查询标本配送业务
  1112. post("/simple/data/fetchDataList/taskType",{
  1113. "idx": 0,
  1114. "sum": 10,
  1115. "taskType": {
  1116. "simpleQuery": true,
  1117. "hosId": {
  1118. "id": userData.user.currentHospital.id
  1119. },
  1120. "associationType": {
  1121. "key": "association_types",
  1122. "value": "specimen"
  1123. }
  1124. }
  1125. }).then((res) => {
  1126. if (res.status == 200) {
  1127. let taskTypeDTO = res.list[0];
  1128. if(taskTypeDTO){
  1129. // 查询业务页面控制-标本
  1130. post("/simple/data/fetchDataList/taskTypeConfig",{
  1131. "idx": 0,
  1132. "sum": 10,
  1133. "taskTypeConfig": {
  1134. taskTypeDTO,
  1135. }
  1136. }).then((res) => {
  1137. // uni.hideLoading();
  1138. if (res.status == 200) {
  1139. let data = res.list[0];
  1140. if(data){
  1141. this.speCollectLimit = data.speCollectLimit;
  1142. }
  1143. } else {
  1144. uni.showToast({
  1145. icon: "none",
  1146. title: res.msg || "接口获取数据失败!",
  1147. });
  1148. }
  1149. });
  1150. }else{
  1151. uni.hideLoading();
  1152. uni.showToast({
  1153. icon: "none",
  1154. title: "未查询到标本配送业务!",
  1155. });
  1156. }
  1157. } else {
  1158. uni.hideLoading();
  1159. uni.showToast({
  1160. icon: "none",
  1161. title: res.msg || "接口获取数据失败!",
  1162. });
  1163. }
  1164. });
  1165. }
  1166. },
  1167. onShow() {
  1168. this.SMFlag = true;
  1169. this.gotoFlag = true;
  1170. let that = this
  1171. // #ifdef APP-PLUS
  1172. uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
  1173. uni.$on('scan', function(data) {
  1174. that.pdaChange(data)
  1175. })
  1176. // #endif
  1177. },
  1178. onLoad(options) {
  1179. console.log(77776666,options)
  1180. this.intercept = options.intercept
  1181. this.isShow = options.isShow
  1182. this.isEndDeptRedShow = options.isEndDeptRed === 'true';
  1183. this.getSys()
  1184. if (options.status == 200&&(options.scanOrHand === 'hand')&&(options.type === "specimen"||options.type === "specimenPlan")) {
  1185. this.getPageConfigSpecimen((flag) => {
  1186. if(flag){
  1187. this.hand_again();
  1188. }
  1189. });
  1190. }
  1191. // else if(options.scanOrHand === 'scan'){
  1192. // if(options.isShow==1){
  1193. // this.getPageConfigSpecimen((flag, type, ress) => {
  1194. // if(flag){
  1195. // setTimeout(()=>{
  1196. // // #ifdef H5
  1197. // this.Scanning_again();
  1198. // // #endif
  1199. // },500)
  1200. // }
  1201. // })
  1202. // }
  1203. // }
  1204. console.log(options , "options");
  1205. this.queryObj = options;
  1206. this.isKs = this.queryObj.isKs;
  1207. if (options.infoData && options.infoData != "undefined") {
  1208. this.infoDATA = JSON.parse(options.infoData);
  1209. } else if (options.model) {
  1210. this.infoDATA = JSON.parse(options.model);
  1211. }
  1212. console.log(this.infoDATA , "infoDATA");
  1213. if (options.accountObj && options.accountObj != "undefined") {
  1214. this.accountObj = JSON.parse(options.accountObj);
  1215. }
  1216. if (options.deptId && options.deptId != "undefined") {
  1217. this.deptId = options.deptId;
  1218. }
  1219. if (options.handover && options.handover != "undefined") {
  1220. this.handover = options.handover;
  1221. }
  1222. this.dataId = options.id;
  1223. if(options.taskTypeId){
  1224. this.taskTypeId = options.taskTypeId
  1225. }else if(this.infoDATA.workOrderList && this.infoDATA.workOrderList.length>0){
  1226. this.taskTypeId = this.infoDATA.workOrderList[0].taskType.id
  1227. }
  1228. this.RESData = options.resData;
  1229. this.res["status"] = options.status;
  1230. this.res["msg"] = options.msg;
  1231. console.log(options.patient);
  1232. this.res["patient"] = options.patient;
  1233. this.res["patientCode"] = options.patientCode;
  1234. this.res["deptName"] = options.deptName;
  1235. this.res["bedNum"] = options.bedNum;
  1236. this.infoType = options.type1;
  1237. if((this.infoType == 'trans-dsd-1' || this.infoType == 'ins-dsd-1'
  1238. || this.infoType == 'ins-half-ok' || this.infoDATA.type == 'ins-half-ok')
  1239. && this.res.status == 200){
  1240. this.getQuestionnaireSet()
  1241. }
  1242. if(
  1243. this.res.status == 200 &&
  1244. this.infoType != 'ins-zxz-1' &&
  1245. this.infoType != 'ins-dsd-1' &&
  1246. this.infoType != 'ins-ddd-1' &&
  1247. this.infoType != 'trans-ddd-1' &&
  1248. this.infoType != 'trans-dsd-1'){
  1249. this.getQuestionnaireSet()
  1250. }
  1251. if (options.dept) {
  1252. this.DEPT = options.dept;
  1253. }
  1254. if (options.speNum) {
  1255. this.speNum = options.speNum;
  1256. }
  1257. this.DEPTCode = options.deptCode;
  1258. this.type = options.type;
  1259. // 标本收取拦截参数
  1260. let sessData = `type=${
  1261. this.queryObj.type
  1262. }&type1=${
  1263. this.queryObj.type1
  1264. }&infoData=${options.infoData}&status=${options.status}&msg=${options.msg}&deptCode=${
  1265. this.queryObj.deptCode
  1266. }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${options.model}&speNum=${this.speNum}&scanOrHand=${options.scanOrHand}&isEndDeptRed=${options.isEndDeptRed}`
  1267. uni.setStorageSync('gdData', JSON.stringify(sessData))
  1268. // #ifdef APP-PLUS
  1269. webHandle("no", "app");
  1270. // #endif
  1271. // #ifdef H5
  1272. webHandle("no", "wx");
  1273. // #endif
  1274. },
  1275. };
  1276. </script>
  1277. <style lang="less">
  1278. .Scanning_Result {
  1279. padding: 0 24rpx;
  1280. height: 96vh;
  1281. position: relative;
  1282. .Scanning_top {
  1283. .Scanning_top_icon {
  1284. width: 140rpx;
  1285. height: 140rpx;
  1286. margin: 0 auto;
  1287. margin-top: 40rpx;
  1288. border-radius: 50%;
  1289. line-height: 140rpx;
  1290. .speNum{
  1291. text-align: center;
  1292. font-size: 140rpx;
  1293. }
  1294. .cubeic-ok {
  1295. font-size: 140rpx;
  1296. color: #35b34a;
  1297. }
  1298. .cubeic-close {
  1299. font-size: 140rpx;
  1300. color: #ff3b53;
  1301. }
  1302. }
  1303. .Scanning_top_text {
  1304. .text1 {
  1305. font-size: 48rpx;
  1306. text-align: center;
  1307. }
  1308. .success_tips {
  1309. color: red;
  1310. font-size: 30rpx;
  1311. }
  1312. }
  1313. }
  1314. .spe{
  1315. height: 50vh;
  1316. }
  1317. .Scanning_cont {
  1318. font-size: 32rpx;
  1319. // text-align: center;
  1320. margin-top: 40rpx;
  1321. // height: 50vh;
  1322. overflow-y: auto;
  1323. .df{
  1324. display: flex;
  1325. align-items: center;
  1326. margin-bottom: 14rpx;
  1327. position: relative;
  1328. .newicon{
  1329. margin: 0 8rpx;
  1330. }
  1331. .mar-le{
  1332. margin-left: 20rpx;
  1333. }
  1334. .po-ab{
  1335. position: absolute;
  1336. right: 0;
  1337. }
  1338. }
  1339. .width-100{
  1340. width: 160rpx;
  1341. font-weight: 600;
  1342. text-align-last: justify;
  1343. }
  1344. .Scanning_cont_center {
  1345. text-align: center;
  1346. }
  1347. .text {
  1348. margin-top: 24rpx;
  1349. color: #35b34a;
  1350. }
  1351. .text1 {
  1352. margin-top: 24rpx;
  1353. color: #ff3b53;
  1354. }
  1355. }
  1356. .foot_btn {
  1357. line-height: 88rpx;
  1358. height: 100rpx;
  1359. margin-top: 40rpx;
  1360. display: flex;
  1361. justify-content: center;
  1362. // position: absolute;
  1363. // bottom: 20rpx;
  1364. // width: 100%;
  1365. .btn1,
  1366. .btn2,
  1367. .btn3 {
  1368. height: 88rpx;
  1369. flex: 1;
  1370. margin: 0 2%;
  1371. background-image: linear-gradient(to right, #72c172, #3bb197);
  1372. color: #fff;
  1373. border-radius: 8rpx;
  1374. font-size: 32rpx;
  1375. margin-top: 16rpx;
  1376. text-align: center;
  1377. }
  1378. }
  1379. .foot_btn_spe {
  1380. line-height: 88rpx;
  1381. // height: 100rpx;
  1382. // margin-top: 40rpx;
  1383. text-align: center;
  1384. display: flex;
  1385. justify-content: space-between;
  1386. flex-wrap: wrap;
  1387. // &::after {
  1388. // content: '';
  1389. // flex: 1;
  1390. // }
  1391. view {
  1392. height: 88rpx;
  1393. width: 48%;
  1394. // margin: 0 1%;
  1395. background-image: linear-gradient(to right, #72c172, #3bb197);
  1396. color: #fff;
  1397. border-radius: 8rpx;
  1398. font-size: 32rpx;
  1399. margin-top: 16rpx;
  1400. }
  1401. }
  1402. }
  1403. </style>