index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. <template>
  2. <view class="query-wrap">
  3. <view class="inner-item" v-for="(item,index) in listData" :key="index">
  4. <view class="item-stats">
  5. <span v-if="item.stas == 'A'">待拣货</span>
  6. <span v-if="item.stas == 'B'">已拣货</span>
  7. </view>
  8. <view class="inventory-item">
  9. <view class="shuo-item-name">
  10. <view class="shuo-label">
  11. 出库单号:
  12. </view>
  13. <view class="shuo-unit">
  14. {{item.stooutId}}
  15. </view>
  16. </view>
  17. </view>
  18. <view class="inventory-item">
  19. <view class="shuo-item-name">
  20. <view class="shuo-label">
  21. 来源订单号:
  22. </view>
  23. <view class="shuo-unit">
  24. {{item.soucId}}
  25. </view>
  26. </view>
  27. </view>
  28. <view class="inventory-item">
  29. <view class="shuo-item">
  30. <view class="shuo-label">
  31. 出库品种数:
  32. </view>
  33. <view class="shuo-cont">
  34. {{item.stoCnt}}
  35. </view>
  36. </view>
  37. <view class="shuo-item">
  38. <view class="shuo-label">
  39. 出库总数量:
  40. </view>
  41. <view class="shuo-cont">
  42. {{item.devCnt}}
  43. </view>
  44. </view>
  45. </view>
  46. <view class="inventory-item">
  47. <view class="shuo-item-name">
  48. <view class="shuo-label">
  49. 出库总金额
  50. </view>
  51. <view class="shuo-unit">
  52. {{item.devAmt}}
  53. </view>
  54. </view>
  55. </view>
  56. <view class="inventory-item">
  57. <view class="shuo-item">
  58. <view class="shuo-label">
  59. 出库类型:
  60. </view>
  61. <view class="shuo-cont">
  62. {{item.stoType}}
  63. </view>
  64. </view>
  65. <view class="shuo-item">
  66. <view class="shuo-label">
  67. 目标位置
  68. </view>
  69. <view class="shuo-cont">
  70. {{item.deptName}}
  71. </view>
  72. </view>
  73. </view>
  74. <view class="inventory-item">
  75. <view class="shuo-item">
  76. <view class="shuo-label">
  77. 出库人:
  78. </view>
  79. <view class="shuo-cont">
  80. {{item.crteUsrName}}
  81. </view>
  82. </view>
  83. <view class="shuo-item">
  84. <view class="shuo-label">
  85. 出库时间:
  86. </view>
  87. <view class="shuo-cont">
  88. {{forMatTime(item.crteTime)}}
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="inner-item">
  94. <view class="text-title">
  95. <view class="title-circ">
  96. </view>
  97. <span>手术信息</span>
  98. </view>
  99. <view class="inventory-item">
  100. <view class="shuo-item">
  101. <view class="shuo-label">
  102. 手术名称:
  103. </view>
  104. <view class="shuo-cont">
  105. {{listData[0].oprnName||""}}
  106. </view>
  107. </view>
  108. <view class="shuo-item">
  109. <view class="shuo-label">
  110. 手术间:
  111. </view>
  112. <view class="shuo-cont">
  113. {{listData[0].oprtRoom||""}}
  114. </view>
  115. </view>
  116. </view>
  117. <view class="inventory-item">
  118. <view class="shuo-item">
  119. <view class="shuo-label">
  120. 主治医生:
  121. </view>
  122. <view class="shuo-cont">
  123. {{listData[0].atddr||""}}
  124. </view>
  125. </view>
  126. <view class="shuo-item">
  127. <view class="shuo-label">
  128. 手术日期:
  129. </view>
  130. <view class="shuo-cont">
  131. {{listData[0].oprtTime?forMatTime(listData[0].oprtTime):""}}
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="inner-item" v-for="(item,idex) in detailsData" :key="idex"
  137. @click.stop="itemDetails(item,idex,'outbond')"
  138. :style="{background:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'red':'#fff')}">
  139. <view class="text-title" v-if="idex==0">
  140. <view class="title-circ">
  141. </view>
  142. <span
  143. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  144. 耗材清单
  145. </span>
  146. </view>
  147. <view class="inventory-item">
  148. <view class="shuo-item-name">
  149. <view class="shuo-label-podnme"
  150. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  151. {{item.prodName}}
  152. </view>
  153. <view class="shuo-unit"
  154. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  155. <span>{{ item.purcUnt }} ({{ item.convrat
  156. }}{{item.prcUnt}}/{{ item.purcUnt }})</span>
  157. </view>
  158. </view>
  159. </view>
  160. <view class="inventory-item">
  161. <view class="shuo-item-name">
  162. <view class="shuo-label"
  163. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  164. 出库数量:
  165. </view>
  166. <view class="shuo-unit"
  167. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  168. {{item.stooutCnt}}
  169. </view>
  170. </view>
  171. </view>
  172. <view class="inventory-item">
  173. <view class="shuo-item-name">
  174. <view class="shuo-label"
  175. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  176. 已拣货:
  177. </view>
  178. <view class="shuo-unit" @click.stop="itemDetails(item,idex,'query')" v-if="item.pickCnt"
  179. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#5AB7A5')}">
  180. {{item.pickCnt}} (查看)
  181. </view>
  182. </view>
  183. </view>
  184. <view class="inventory-item">
  185. <view class="shuo-item">
  186. <view class="shuo-label"
  187. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  188. 规格:
  189. </view>
  190. <view class="shuo-cont"
  191. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  192. {{item.spec}}
  193. </view>
  194. </view>
  195. <view class="shuo-item">
  196. <view class="shuo-label"
  197. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  198. 型号:
  199. </view>
  200. <view class="shuo-cont"
  201. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  202. {{item.mol}}
  203. </view>
  204. </view>
  205. </view>
  206. <view class="inventory-item">
  207. <view class="shuo-item-name">
  208. <view class="shuo-label"
  209. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  210. 注册证号:
  211. </view>
  212. <view class="shuo-cont"
  213. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  214. {{item.regcertno}}
  215. </view>
  216. </view>
  217. </view>
  218. <view class="inventory-item">
  219. <view class="shuo-item">
  220. <view class="shuo-label"
  221. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  222. 耗材类别:
  223. </view>
  224. <view class="shuo-cont"
  225. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  226. <span v-if="item.mcsType == '0'"> 普通耗材 </span>
  227. <span v-if="item.mcsType == '1'"> 高值耗材 </span>
  228. <span v-if="item.mcsType == '2'"> 试剂 </span>
  229. <span v-if="item.mcsType == '3'"> 总务耗材 </span>
  230. </view>
  231. </view>
  232. <view class="shuo-item">
  233. <view class="shuo-label"
  234. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  235. 生产来源:
  236. </view>
  237. <view class="shuo-cont"
  238. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  239. <span v-if="item.prodSouc == '1'" type="success"> 国产 </span>
  240. <span v-if="item.prodSouc == '2'" type="danger"> 进口 </span>
  241. </view>
  242. </view>
  243. </view>
  244. <view class="inventory-item">
  245. <view class="shuo-item-name">
  246. <view class="shuo-label"
  247. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  248. 生产企业:
  249. </view>
  250. <view class="shuo-cont"
  251. :style="{color:(item.pickCnt==null||Number(item.pickCnt)<Number(item.stooutCnt)?'#fff':'#101010')}">
  252. {{item.prodEntp}}
  253. </view>
  254. </view>
  255. </view>
  256. </view>
  257. <uni-popup ref="popup">
  258. <uni-popup-dialog type="warn" :before-close="true" cancelText="取消" confirmText="确定" content="你确定拣货吗?"
  259. @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
  260. </uni-popup>
  261. <view class="botm-btn" v-if="listData[0].stas=='A'">
  262. <button type=" default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"
  263. @click.stop="orderAcept()">拣货完成</button>
  264. </view>
  265. </view>
  266. </template>
  267. <script>
  268. import {
  269. mapState,
  270. mapMutations,
  271. mapActions
  272. } from 'vuex';
  273. import moment from "moment";
  274. const paging = {
  275. current: 1,
  276. size: 10000
  277. };
  278. export default {
  279. data() {
  280. return {
  281. listData: [],
  282. detailsData: [],
  283. type: ""
  284. }
  285. },
  286. computed: {
  287. ...mapState([])
  288. },
  289. onShow() {
  290. let that = this;
  291. this.$forceUpdate();
  292. uni.getStorage({
  293. key: 'picking-details',
  294. success: function(res) {
  295. that.listData = [
  296. res.data
  297. ];
  298. that.getData({
  299. stooutId: res.data.stooutId,
  300. soucStroomId: res.data.soucStroomId,
  301. });
  302. }
  303. });
  304. },
  305. mounted() {
  306. },
  307. methods: {
  308. ...mapActions([]),
  309. ...mapMutations(['setMentItemData', 'setRefusaData']),
  310. async getData(pam) {
  311. await this.$http('outbound.getDetailsData', {
  312. current: 1,
  313. size: 1000,
  314. stooutId: pam.stooutId,
  315. soucStroomId: pam.soucStroomId,
  316. }, '加载中', true).then((res) => {
  317. if (res.success == true) {
  318. res.data.records.map((item) => {
  319. item["stooutId"] = pam.stooutId;
  320. });
  321. this.detailsData = res.data.records;
  322. }
  323. })
  324. },
  325. //确定拣货
  326. dialogConfirm() {
  327. this.$http('outbound.complatePickIng', this.detailsData, '加载中', true).then((res) => {
  328. if (res.success == true) {
  329. this.$refs.popup.close();
  330. uni.redirectTo({
  331. url: '/pages/outbound/outbound',
  332. success: function(res) {
  333. console.log(res, "res")
  334. }
  335. });
  336. } else {
  337. this.$refs.popup.close();
  338. }
  339. })
  340. },
  341. //验收按钮触发
  342. orderAcept(type) {
  343. this.$refs.popup.open();
  344. this.type = type;
  345. },
  346. dialogClose() {
  347. this.$refs.popup.close();
  348. },
  349. //日期格式化
  350. forMatTime(time) {
  351. return moment(time).format("YYYY-MM-DD");
  352. },
  353. //跳转拣货明细详情
  354. itemDetails(item, index, type) {
  355. if (type == 'outbond' && this.listData[0].stas == "B") {
  356. return;
  357. }
  358. if (type == 'outbond'&&Number(item.pickCnt) >= Number(item.stooutCnt)) {
  359. return;
  360. }
  361. uni.setStorage({
  362. key: 'pickIngData',
  363. data: {
  364. ...item,
  365. type: type,
  366. stooutId: this.listData[0].stooutId,
  367. stas: this.listData[0].stas
  368. }
  369. });
  370. uni.navigateTo({
  371. url: '/pages/pickingview/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>