details.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. <template>
  2. <view class="query-wrap">
  3. <view class="inner-item">
  4. <view class="item-stats">
  5. {{acceptDetaData.stas=='C'?'已验收':"待验收"}}
  6. </view>
  7. <view class="inventory-item" v-if="acceptDetaData.stas=='C'">
  8. <view class="shuo-item-name">
  9. <view class="shuo-label">
  10. 验收单号:
  11. </view>
  12. <view class="shuo-unit">
  13. {{acceptDetaData.id}}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="inventory-item" v-if="acceptDetaData.stas=='C'">
  18. <view class="shuo-item-name">
  19. <view class="shuo-label">
  20. 本次验收量:
  21. </view>
  22. <view class="shuo-unit">
  23. {{acceptDetaData.mcsCnt}}
  24. </view>
  25. </view>
  26. </view>
  27. <view class="inventory-item" v-if="acceptDetaData.stas=='B'">
  28. <view class="shuo-item-name">
  29. <view class="shuo-label">
  30. 配送单号:
  31. </view>
  32. <view class="shuo-unit">
  33. {{acceptDetaData.stooutId}}
  34. </view>
  35. </view>
  36. </view>
  37. <view class="inventory-item">
  38. <view class="shuo-item">
  39. <view class="shuo-label">
  40. 配送品种数:
  41. </view>
  42. <view class="shuo-cont">
  43. {{acceptDetaData.stoCnt}}
  44. </view>
  45. </view>
  46. <view class="shuo-item">
  47. <view class="shuo-label">
  48. 配送总数量:
  49. </view>
  50. <view class="shuo-cont">
  51. {{acceptDetaData.devCnt}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="inventory-item">
  56. <view class="shuo-item">
  57. <view class="shuo-label">
  58. 采购品种数:
  59. </view>
  60. <view class="shuo-cont">
  61. {{acceptDetaData.catCnt}}
  62. </view>
  63. </view>
  64. <view class="shuo-item">
  65. <view class="shuo-label">
  66. 采购总数量:
  67. </view>
  68. <view class="shuo-cont">
  69. {{acceptDetaData.sumCnt}}
  70. </view>
  71. </view>
  72. </view>
  73. <view class="inventory-item">
  74. <view class="shuo-item-name">
  75. <view class="shuo-label">
  76. 未配送数量:
  77. </view>
  78. <view class="shuo-cont">
  79. {{acceptDetaData.lstCnt}}
  80. </view>
  81. </view>
  82. </view>
  83. <view class="inventory-item" v-if="acceptDetaData.stas=='C'">
  84. <view class="shuo-item-name">
  85. <view class="shuo-label">
  86. 配送单号:
  87. </view>
  88. <view class="shuo-cont">
  89. {{acceptDetaData.stooutId}}
  90. </view>
  91. </view>
  92. </view>
  93. <view class="inventory-item" v-if="acceptDetaData.stas=='B'">
  94. <view class="shuo-item">
  95. <view class="shuo-label">
  96. 采购员:
  97. </view>
  98. <view class="shuo-cont">
  99. {{acceptDetaData.crteUsrName}}
  100. </view>
  101. </view>
  102. <view class="shuo-item">
  103. <view class="shuo-label">
  104. 采购时间:
  105. </view>
  106. <view class="shuo-cont" style="font-size: 18rpx;">
  107. {{ forMatTimehs(acceptDetaData.crteTime) }}
  108. </view>
  109. </view>
  110. </view>
  111. <view class="inventory-item" v-if="acceptDetaData.stas=='C'">
  112. <view class="shuo-item">
  113. <view class="shuo-label">
  114. 验收员:
  115. </view>
  116. <view class="shuo-cont">
  117. {{acceptDetaData.crteUsrName}}
  118. </view>
  119. </view>
  120. <view class="shuo-item">
  121. <view class="shuo-label">
  122. 验收时间:
  123. </view>
  124. <view class="shuo-cont">
  125. {{ forMatTime(acceptDetaData.crteTime) }}
  126. </view>
  127. </view>
  128. </view>
  129. <view class="inventory-item">
  130. <view class="shuo-item">
  131. <view class="shuo-label">
  132. 采购类型:
  133. </view>
  134. <view class="shuo-cont">
  135. <span v-if="acceptDetaData.purcType == 'A'">普通采购</span>
  136. <span v-if="acceptDetaData.purcType == 'B'">手术备货</span>
  137. </view>
  138. </view>
  139. <view class="shuo-item">
  140. <view class="shuo-label">
  141. 采购订单号:
  142. </view>
  143. <view class="shuo-it-ut">
  144. {{acceptDetaData.soucId}}
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <view class="inner-item" v-if="acceptDetaData.purcType=='B'">
  150. <view class="text-title">
  151. <view class="title-circ">
  152. </view>
  153. <span>手术信息</span>
  154. </view>
  155. <view class="inventory-item">
  156. <view class="shuo-item">
  157. <view class="shuo-label">
  158. 手术名称:
  159. </view>
  160. <view class="shuo-cont">
  161. {{acceptDetaData.oprnName}}
  162. </view>
  163. </view>
  164. <view class="shuo-item">
  165. <view class="shuo-label">
  166. 手术间:
  167. </view>
  168. <view class="shuo-cont">
  169. {{acceptDetaData.oprtRoom}}
  170. </view>
  171. </view>
  172. </view>
  173. <view class="inventory-item">
  174. <view class="shuo-item">
  175. <view class="shuo-label">
  176. 主治医生:
  177. </view>
  178. <view class="shuo-cont">
  179. {{acceptDetaData.atddr}}
  180. </view>
  181. </view>
  182. <view class="shuo-item">
  183. <view class="shuo-label">
  184. 手术日期:
  185. </view>
  186. <view class="shuo-cont">
  187. {{forMatTime(acceptDetaData.oprtTime)}}
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. <view class="inner-item" v-for="(item,idex) in acceptDetail" :key="idex" @click.stop="itemDetails(item,idex)">
  193. <view class="text-title" v-if="idex=='0'">
  194. <view class="title-circ">
  195. </view>
  196. <span>耗材清单</span>
  197. </view>
  198. <view class="inventory-item">
  199. <view class="shuo-item-name">
  200. <view class="shuo-label-podnme">
  201. {{item.prodName}}
  202. </view>
  203. <view class="shuo-unit">
  204. <span>{{ item.purcUnt }} ({{ item.convrat
  205. }}{{item.prcUnt}}/{{ item.purcUnt }})</span>
  206. </view>
  207. </view>
  208. </view>
  209. <view class="inventory-item">
  210. <view class="shuo-item">
  211. <view class="shuo-label">
  212. 验收数量:
  213. </view>
  214. <view class="shuo-label-green">
  215. {{item.shppCnt}}
  216. </view>
  217. </view>
  218. <view class="shuo-item">
  219. <view class="shuo-label">
  220. 拒收数量:
  221. </view>
  222. <view class="shuo-label-red">
  223. {{item.retCnt||0}}
  224. </view>
  225. </view>
  226. </view>
  227. <view class="inventory-item">
  228. <view class="shuo-item">
  229. <view class="shuo-label">
  230. 规格:
  231. </view>
  232. <view class="shuo-cont">
  233. {{item.spec}}
  234. </view>
  235. </view>
  236. <view class="shuo-item">
  237. <view class="shuo-label">
  238. 型号:
  239. </view>
  240. <view class="shuo-cont">
  241. {{item.mol}}
  242. </view>
  243. </view>
  244. </view>
  245. <view class="inventory-item">
  246. <view class="shuo-item">
  247. <view class="shuo-label">
  248. 集采批次:
  249. </view>
  250. <view class="shuo-cont">
  251. {{item.fasBtch}}
  252. </view>
  253. </view>
  254. <view class="shuo-item">
  255. <view class="shuo-label">
  256. 注册证号:
  257. </view>
  258. <view class="shuo-cont">
  259. {{item.regcertno}}
  260. </view>
  261. </view>
  262. </view>
  263. <view class="inventory-item">
  264. <view class="shuo-item">
  265. <view class="shuo-label">
  266. 生产日期:
  267. </view>
  268. <view class="shuo-cont">
  269. {{item.manuDate?forMatTime(item.manuDate):""}}
  270. </view>
  271. </view>
  272. <view class="shuo-item">
  273. <view class="shuo-label">
  274. 有效日期:
  275. </view>
  276. <view class="shuo-cont">
  277. {{item.prodExpy?forMatTime(item.prodExpy):""}}
  278. </view>
  279. </view>
  280. </view>
  281. <view class="inventory-item">
  282. <view class="shuo-item">
  283. <view class="shuo-label">
  284. 耗材类别:
  285. </view>
  286. <view class="shuo-cont-blue">
  287. <span v-if="item.mcsType == '0'"> 普通耗材 </span>
  288. <span v-if="item.mcsType == '1'"> 高值耗材 </span>
  289. <span v-if="item.mcsType == '2'"> 试剂 </span>
  290. <span v-if="item.mcsType == '3'"> 总务耗材 </span>
  291. </view>
  292. </view>
  293. <view class="shuo-item">
  294. <view class="shuo-label">
  295. 生产来源:
  296. </view>
  297. <view class="shuo-cont-blue">
  298. <span v-if="item.prodSouc == '1'" type="success"> 国产 </span>
  299. <span v-if="item.prodSouc == '2'" type="danger"> 进口 </span>
  300. </view>
  301. </view>
  302. </view>
  303. <view class="inventory-item">
  304. <view class="shuo-item-name">
  305. <view class="shuo-label">
  306. 生产企业:
  307. </view>
  308. <view class="shuo-cont">
  309. {{item.prodEntp}}
  310. </view>
  311. </view>
  312. </view>
  313. </view>
  314. <uni-popup ref="popup">
  315. <uni-popup-dialog type="warn" :before-close="true" cancelText="取消" confirmText="确定" content="你确定验收当前订单吗?"
  316. @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
  317. </uni-popup>
  318. <view class="botm-btn" v-if="acceptDetaData.stas=='B'">
  319. <button type="default" plain="true" style="width:200rpx;line-height: 70rpx;background: #01A992;color:#fff"
  320. @click.stop="orderAcept()">验收</button>
  321. </view>
  322. </view>
  323. </template>
  324. <script>
  325. import {
  326. mapState,
  327. mapMutations,
  328. mapActions
  329. } from 'vuex';
  330. import moment from "moment";
  331. const paging = {
  332. current: 1,
  333. size: 10000
  334. };
  335. export default {
  336. data() {
  337. return {
  338. listData: [],
  339. acceptDetaData: {}
  340. }
  341. },
  342. computed: {
  343. ...mapState(['acceptDetail'])
  344. },
  345. onShow() {
  346. let that = this;
  347. that.$forceUpdate();
  348. uni.getStorage({
  349. key: 'accept-storage-details',
  350. success: function(res) {
  351. that.acceptDetaData = res.data;
  352. }
  353. });
  354. },
  355. mounted() {
  356. this.$nextTick(() => {
  357. this.touData(this.acceptDetaData);
  358. })
  359. },
  360. methods: {
  361. ...mapActions(['getAwaitDetail', 'getAreadyDetail', 'submitAceptData']),
  362. ...mapMutations(['setMentItemData', 'setRefusaData']),
  363. async touData(data) {
  364. if (data && data.stas == "C") {
  365. await this.getAreadyDetail({
  366. ...paging,
  367. stoinId: data.id || 0
  368. })
  369. } else {
  370. await this.getAwaitDetail({
  371. ...paging,
  372. stooutId: data.stooutId || 0
  373. })
  374. }
  375. },
  376. //确定验收
  377. async dialogConfirm() {
  378. await this.submitAceptData({
  379. stooutId: this.acceptDetaData.stooutId || 0,
  380. soucId: this.acceptDetaData.soucId || 0,
  381. mcsStooutDetlDReqDTOS: this.acceptDetail
  382. }).then((res) => {
  383. this.$refs.popup.close();
  384. uni.redirectTo({
  385. url: '/pages/acceptance/index',
  386. success: function(res) {
  387. }
  388. });
  389. })
  390. },
  391. //验收按钮触发
  392. orderAcept() {
  393. this.$refs.popup.open();
  394. },
  395. dialogClose() {
  396. this.$refs.popup.close();
  397. },
  398. //日期格式化
  399. forMatTime(time) {
  400. return moment(time).format("YYYY-MM-DD");
  401. },
  402. //加时分秒
  403. forMatTimehs(time) {
  404. return moment(time).format("YYYY-MM-DD HH:mm");
  405. },
  406. //跳转耗材清单详情
  407. itemDetails(item, index) {
  408. this.setRefusaData({
  409. index: index,
  410. data: {
  411. ...item,
  412. purcType: this.acceptDetaData.purcType
  413. }
  414. })
  415. uni.navigateTo({
  416. url: '/pages/acceptrefusal/index',
  417. success: function(res) {
  418. }
  419. });
  420. },
  421. },
  422. watch: {
  423. }
  424. }
  425. </script>
  426. <style lang="scss" scoped>
  427. .query-wrap {
  428. width: 100%;
  429. height: 100%;
  430. padding: 20rpx;
  431. box-sizing: border-box;
  432. background-color: #F1F1F1;
  433. overflow-y: scroll;
  434. overflow-x: hidden;
  435. position: relative;
  436. padding-bottom: 200rpx;
  437. .botm-btn {
  438. width: 100%;
  439. height: 120rpx;
  440. background-color: #fff;
  441. position: fixed;
  442. left: 0;
  443. bottom: 0;
  444. padding-top: 40rpx;
  445. }
  446. .time-view {
  447. height: 350rpx;
  448. background-color: #fff;
  449. padding: 50rpx 50rpx 0 50rpx;
  450. box-sizing: border-box;
  451. .btn-view {
  452. width: 100%;
  453. height: 100rpx;
  454. margin-top: 100rpx;
  455. display: flex;
  456. justify-content: space-around;
  457. }
  458. }
  459. }
  460. uni-page-body {
  461. width: 100%;
  462. height: 100%;
  463. }
  464. </style>