index.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. <template>
  2. <view class="query-wrap">
  3. <qs-scanlistener @scan="scan"></qs-scanlistener>
  4. <view class="inner-item" v-for="(item,index) in listData" :key="index">
  5. <view class="item-stats">
  6. <span>{{item.stas}}</span>
  7. </view>
  8. <view class="inventory-item">
  9. <view class="shuo-item-name">
  10. <view class="shuo-label">
  11. {{type=='3'?'订单号:':"申领单号:"}}
  12. </view>
  13. <view class="shuo-unit">
  14. {{type=='3'?item.ordNo:item.appyNo}}
  15. </view>
  16. </view>
  17. </view>
  18. <view class="inventory-item">
  19. <view class="shuo-item">
  20. <view class="shuo-label">
  21. 申领品种数:
  22. </view>
  23. <view class="shuo-cont">
  24. {{item.catCnt}}
  25. </view>
  26. </view>
  27. <view class="shuo-item">
  28. <view class="shuo-label">
  29. 申领总数量:
  30. </view>
  31. <view class="shuo-cont">
  32. {{item.sumCnt}}
  33. </view>
  34. </view>
  35. </view>
  36. <view class="inventory-item">
  37. <view class="shuo-item">
  38. <view class="shuo-label">
  39. 手术名称:
  40. </view>
  41. <view class="shuo-cont">
  42. {{item.oprnName}}
  43. </view>
  44. </view>
  45. <view class="shuo-item">
  46. <view class="shuo-label">
  47. 手术间:
  48. </view>
  49. <view class="shuo-cont">
  50. {{item.oprtRoom}}
  51. </view>
  52. </view>
  53. </view>
  54. <view class="inventory-item">
  55. <view class="shuo-item">
  56. <view class="shuo-label">
  57. 主治医生:
  58. </view>
  59. <view class="shuo-cont">
  60. {{item.atddr}}
  61. </view>
  62. </view>
  63. <view class="shuo-item">
  64. <view class="shuo-label">
  65. 患者名称:
  66. </view>
  67. <view class="shuo-cont">
  68. {{item.patn}}
  69. </view>
  70. </view>
  71. </view>
  72. <view class="inventory-item">
  73. <view class="shuo-item">
  74. <view class="shuo-label">
  75. 手术日期:
  76. </view>
  77. <view class="shuo-cont">
  78. {{item.oprtTime}}
  79. </view>
  80. </view>
  81. <view class="shuo-item">
  82. <view class="shuo-label">
  83. 患者年龄:
  84. </view>
  85. <view class="shuo-cont">
  86. {{item.age}}
  87. </view>
  88. </view>
  89. </view>
  90. <view class="inventory-item">
  91. <view class="shuo-item">
  92. <view class="shuo-label">
  93. 住院号:
  94. </view>
  95. <view class="shuo-cont">
  96. {{item.iptNo}}
  97. </view>
  98. </view>
  99. <view class="shuo-item">
  100. <view class="shuo-label">
  101. 床位号:
  102. </view>
  103. <view class="shuo-cont">
  104. {{item.bedNo}}
  105. </view>
  106. </view>
  107. </view>
  108. <view class="inventory-item">
  109. <view class="shuo-item-name">
  110. <view class="shuo-label">
  111. 供应商:
  112. </view>
  113. <view class="shuo-cont">
  114. {{item.splerName}}
  115. </view>
  116. </view>
  117. </view>
  118. <view class="inventory-item">
  119. <view class="shuo-item">
  120. <view class="shuo-label">
  121. 申领人:
  122. </view>
  123. <view class="shuo-cont">
  124. {{item.crteUsrName}}
  125. </view>
  126. </view>
  127. <view class="shuo-item">
  128. <view class="shuo-label">
  129. 申领时间:
  130. </view>
  131. <view class="shuo-cont">
  132. {{item.crteTime}}
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. <view class="inner-item" v-for="(item,idex) in detailsData" :key="idex" @click.stop="itemDetails(item,idex)"
  138. :style="[{background:(item.isUse=='0'?'#fff':'yellow')}]">
  139. <view class="text-title" v-if="idex=='0'">
  140. <view class="title-circ">
  141. </view>
  142. <span>耗材清单</span>
  143. </view>
  144. <view class="inventory-item">
  145. <view class="shuo-item-name">
  146. <view class="shuo-label-podnme">
  147. {{item.prodName}}
  148. </view>
  149. <view class="shuo-unit">
  150. <span>{{ item.unt }} ({{ item.pacCnt
  151. }}{{item.prcUnt}}/{{ item.unt }})</span>
  152. </view>
  153. </view>
  154. </view>
  155. <view class="inventory-item">
  156. <view class="shuo-item-name">
  157. <view class="shuo-label">
  158. 使用数量:
  159. </view>
  160. <view class="shuo-unit">
  161. {{item.isUse}}
  162. </view>
  163. </view>
  164. </view>
  165. <view class="inventory-item">
  166. <view class="shuo-item">
  167. <view class="shuo-label">
  168. 规格:
  169. </view>
  170. <view class="shuo-cont">
  171. {{item.spec}}
  172. </view>
  173. </view>
  174. <view class="shuo-item">
  175. <view class="shuo-label">
  176. 型号:
  177. </view>
  178. <view class="shuo-cont">
  179. {{item.mol}}
  180. </view>
  181. </view>
  182. </view>
  183. <view class="inventory-item">
  184. <view class="shuo-item">
  185. <view class="shuo-label">
  186. 材质:
  187. </view>
  188. <view class="shuo-cont">
  189. {{item.matl}}
  190. </view>
  191. </view>
  192. <view class="shuo-item">
  193. <view class="shuo-label">
  194. UDI码:
  195. </view>
  196. <view class="shuo-cont">
  197. {{item.udi}}
  198. </view>
  199. </view>
  200. </view>
  201. <view class="inventory-item">
  202. <view class="shuo-item-name">
  203. <view class="shuo-label">
  204. 生产批次:
  205. </view>
  206. <view class="shuo-unit">
  207. {{item.lotNum}}
  208. </view>
  209. </view>
  210. </view>
  211. <view class="inventory-item">
  212. <view class="shuo-item-name">
  213. <view class="shuo-label">
  214. 注册证号:
  215. </view>
  216. <view class="shuo-cont">
  217. {{item.regcertno}}
  218. </view>
  219. </view>
  220. </view>
  221. <view class="inventory-item">
  222. <view class="shuo-item">
  223. <view class="shuo-label">
  224. 生产日期:
  225. </view>
  226. <view class="shuo-cont">
  227. {{item.manuDate?forMatTime(item.manuDate):""}}
  228. </view>
  229. </view>
  230. <view class="shuo-item">
  231. <view class="shuo-label">
  232. 有效日期:
  233. </view>
  234. <view class="shuo-cont">
  235. {{item.prodExpy?forMatTime(item.prodExpy):""}}
  236. </view>
  237. </view>
  238. </view>
  239. </view>
  240. <uni-popup ref="popup">
  241. <uni-popup-dialog type="warn" :before-close="true" cancelText="取消" confirmText="确定" content="你确定清台吗?"
  242. @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
  243. </uni-popup>
  244. <view class="botm-btn" v-if="listData.length>0&&listData[0].stas=='待清台'">
  245. <button type="default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"
  246. @click.stop="orderAcept('')">清台</button>
  247. </view>
  248. </view>
  249. </template>
  250. <script>
  251. import {
  252. mapState,
  253. mapMutations,
  254. mapActions
  255. } from 'vuex';
  256. import moment from "moment";
  257. const paging = {
  258. current: 1,
  259. size: 10000
  260. };
  261. export default {
  262. data() {
  263. return {
  264. listData: [],
  265. detailsData: [],
  266. type: ""
  267. }
  268. },
  269. computed: {
  270. ...mapState(['acceptDetaData', 'acceptDetail'])
  271. },
  272. onShow() {
  273. let that = this;
  274. this.$forceUpdate();
  275. uni.getStorage({
  276. key: 'followplatdetail',
  277. success: function(res) {
  278. that.listData = [
  279. res.data.form
  280. ];
  281. that.getData(
  282. res.data.form.oprnId,
  283. res.data.type
  284. );
  285. that.type = res.data.type;
  286. }
  287. });
  288. },
  289. mounted() {
  290. },
  291. methods: {
  292. ...mapActions([]),
  293. ...mapMutations(['setMentItemData', 'setRefusaData']),
  294. getData(
  295. id,
  296. type
  297. ) {
  298. console.log(id,type,'rrrr');
  299. this.$http('followplat.detailsData', {
  300. oprnId: id,
  301. type: type
  302. }, '加载中', true).then((res) => {
  303. if (res.success == true) {
  304. this.detailsData = res.data;
  305. }
  306. })
  307. },
  308. //扫码清台
  309. scan(code) {
  310. let pam = {
  311. oprnId: this.listData[0].oprnId,
  312. code: code.trim(),
  313. isUse: "1"
  314. };
  315. this.$http('followplat.oprnMcsUse', pam, '加载中', true).then((res) => {
  316. if (res.success == true) {
  317. this.getData(
  318. this.listData[0].oprnId,
  319. this.type
  320. );
  321. }
  322. })
  323. },
  324. //确定清台
  325. dialogConfirm() {
  326. let url = this.type == '2' ? 'surgical.subMitData' : 'followplat.subMitData';
  327. this.$http(url, {
  328. oprnId: this.listData[0].oprnId,
  329. }, '加载中', true).then((res) => {
  330. if (res.success == true) {
  331. this.$refs.popup.close();
  332. if (this.type == '3') {
  333. uni.redirectTo({
  334. url: '/pages/followplat/index',
  335. success: function(res) {
  336. console.log(res, "res")
  337. }
  338. });
  339. }
  340. if (this.type == '2') {
  341. uni.redirectTo({
  342. url: '/pages/surgical/index',
  343. success: function(res) {
  344. console.log(res, "res")
  345. }
  346. });
  347. }
  348. }
  349. })
  350. },
  351. //验收按钮触发
  352. orderAcept() {
  353. this.$refs.popup.open();
  354. },
  355. dialogClose() {
  356. this.$refs.popup.close();
  357. },
  358. //日期格式化
  359. forMatTime(time) {
  360. return moment(time).format("YYYY-MM-DD");
  361. },
  362. //跳转拣货明细详情
  363. itemDetails(item, index) {
  364. uni.setStorage({
  365. key: 'followdetview',
  366. data: {
  367. ...item
  368. }
  369. });
  370. uni.navigateTo({
  371. url: '/pages/followdetview/index',
  372. success: function(res) {
  373. console.log(res, "res")
  374. }
  375. });
  376. },
  377. },
  378. watch: {
  379. }
  380. }
  381. </script>
  382. <style lang="scss" scoped>
  383. .query-wrap {
  384. width: 100%;
  385. height: 100%;
  386. padding: 20rpx;
  387. box-sizing: border-box;
  388. background-color: #F1F1F1;
  389. overflow-y: scroll;
  390. overflow-x: hidden;
  391. position: relative;
  392. padding-bottom: 200rpx;
  393. .botm-btn {
  394. width: 100%;
  395. height: 120rpx;
  396. background-color: #fff;
  397. position: fixed;
  398. left: 0;
  399. bottom: 0;
  400. padding-top: 40rpx;
  401. }
  402. .time-view {
  403. height: 350rpx;
  404. background-color: #fff;
  405. padding: 50rpx 50rpx 0 50rpx;
  406. box-sizing: border-box;
  407. .btn-view {
  408. width: 100%;
  409. height: 100rpx;
  410. margin-top: 100rpx;
  411. display: flex;
  412. justify-content: space-around;
  413. }
  414. }
  415. }
  416. uni-page-body {
  417. width: 100%;
  418. height: 100%;
  419. }
  420. </style>