index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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. <span v-if="item.stas == 'C'">配送中</span>
  8. <span v-if="item.stas == 'D'">已配送</span>
  9. </view>
  10. <view class="inventory-item">
  11. <view class="shuo-item-name">
  12. <view class="shuo-label">
  13. 出库订单号:
  14. </view>
  15. <view class="shuo-unit">
  16. {{item.stooutId}}
  17. </view>
  18. </view>
  19. </view>
  20. <view class="inventory-item">
  21. <view class="shuo-item-name">
  22. <view class="shuo-label">
  23. 来源订单号:
  24. </view>
  25. <view class="shuo-unit">
  26. {{item.soucId}}
  27. </view>
  28. </view>
  29. </view>
  30. <view class="inventory-item">
  31. <view class="shuo-item">
  32. <view class="shuo-label">
  33. 出库品种数:
  34. </view>
  35. <view class="shuo-cont">
  36. {{item.stoCnt}}
  37. </view>
  38. </view>
  39. <view class="shuo-item">
  40. <view class="shuo-label">
  41. 出库总数量:
  42. </view>
  43. <view class="shuo-cont">
  44. {{item.devCnt}}
  45. </view>
  46. </view>
  47. </view>
  48. <view class="inventory-item">
  49. <view class="shuo-item-name">
  50. <view class="shuo-label">
  51. 出库总金额:
  52. </view>
  53. <view class="shuo-unit">
  54. {{item.devAmt}}
  55. </view>
  56. </view>
  57. </view>
  58. <view class="inventory-item">
  59. <view class="shuo-item-name">
  60. <view class="shuo-label">
  61. 出库类型:
  62. </view>
  63. <view class="shuo-cont">
  64. {{item.stoType}}
  65. </view>
  66. </view>
  67. </view>
  68. <view class="inventory-item">
  69. <view class="shuo-item-name">
  70. <view class="shuo-label">
  71. 目标位置:
  72. </view>
  73. <view class="shuo-cont">
  74. {{item.deptName}}
  75. </view>
  76. </view>
  77. </view>
  78. <view class="inventory-item">
  79. <view class="shuo-item">
  80. <view class="shuo-label">
  81. 出库人:
  82. </view>
  83. <view class="shuo-cont">
  84. {{item.crteUsrName}}
  85. </view>
  86. </view>
  87. <view class="shuo-item">
  88. <view class="shuo-label">
  89. 出库时间:
  90. </view>
  91. <view class="shuo-cont">
  92. {{forMatTime(item.crteTime)}}
  93. </view>
  94. </view>
  95. </view>
  96. <view class="upload-file-wrap" v-if="listData[0].stas=='C'">
  97. <view class="tit-label">
  98. 接收文件:
  99. </view>
  100. <view class="file-wrap">
  101. <jade-image-upload :list="media" :control="control" :maxCount="maxCount"
  102. :compressSize="compressSize" :compressQuality="compressQuality" :compressWidth='compressWidth'
  103. :imageSize="imageSize" :sourceType="sourceType" @chooseFile="chooseFile"
  104. @imgDelete="mediaDelete">
  105. </jade-image-upload>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="inner-item">
  110. <view class="text-title">
  111. <view class="title-circ">
  112. </view>
  113. <span>手术信息</span>
  114. </view>
  115. <view class="inventory-item">
  116. <view class="shuo-item">
  117. <view class="shuo-label">
  118. 手术名称:
  119. </view>
  120. <view class="shuo-cont">
  121. {{listData[0].oprnName}}
  122. </view>
  123. </view>
  124. <view class="shuo-item">
  125. <view class="shuo-label">
  126. 手术间:
  127. </view>
  128. <view class="shuo-cont">
  129. {{listData[0].oprtRoom}}
  130. </view>
  131. </view>
  132. </view>
  133. <view class="inventory-item">
  134. <view class="shuo-item">
  135. <view class="shuo-label">
  136. 主治医生:
  137. </view>
  138. <view class="shuo-cont">
  139. {{listData[0].atddr}}
  140. </view>
  141. </view>
  142. <view class="shuo-item">
  143. <view class="shuo-label">
  144. 手术日期:
  145. </view>
  146. <view class="shuo-cont">
  147. {{listData[0].oprtTime?forMatTime(listData[0].oprtTime):""}}
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. <view class="inner-item" v-for="(item,idex) in detailsData" :key="idex" @click.stop="itemDetails(item,idex)">
  153. <view class="text-title" v-if="idex=='0'">
  154. <view class="title-circ">
  155. </view>
  156. <span>商品清单</span>
  157. </view>
  158. <view class="inventory-item">
  159. <view class="shuo-item-name">
  160. <view class="shuo-label-podnme">
  161. {{item.prodName}}
  162. </view>
  163. <view class="shuo-unit">
  164. <span>{{ item.purcUnt }} ({{ item.convrat
  165. }}{{item.prcUnt}}/{{ item.purcUnt }})</span>
  166. </view>
  167. </view>
  168. </view>
  169. <view class="inventory-item">
  170. <view class="shuo-item-name">
  171. <view class="shuo-label">
  172. 出库数量:
  173. </view>
  174. <view class="shuo-unit">
  175. {{item.stooutCnt}}
  176. </view>
  177. </view>
  178. </view>
  179. <view class="inventory-item">
  180. <view class="shuo-item">
  181. <view class="shuo-label">
  182. 规格:
  183. </view>
  184. <view class="shuo-cont">
  185. {{item.spec}}
  186. </view>
  187. </view>
  188. <view class="shuo-item">
  189. <view class="shuo-label">
  190. 型号:
  191. </view>
  192. <view class="shuo-cont">
  193. {{item.mol}}
  194. </view>
  195. </view>
  196. </view>
  197. <view class="inventory-item">
  198. <view class="shuo-item-name">
  199. <view class="shuo-label">
  200. 注册证号:
  201. </view>
  202. <view class="shuo-cont">
  203. {{item.regcertno}}
  204. </view>
  205. </view>
  206. </view>
  207. <view class="inventory-item">
  208. <view class="shuo-item">
  209. <view class="shuo-label">
  210. 耗材类别:
  211. </view>
  212. <view class="shuo-cont-blue">
  213. <span v-if="item.mcsType == '0'"> 普通耗材 </span>
  214. <span v-if="item.mcsType == '1'"> 高值耗材 </span>
  215. <span v-if="item.mcsType == '2'"> 试剂 </span>
  216. <span v-if="item.mcsType == '3'"> 总务耗材 </span>
  217. </view>
  218. </view>
  219. <view class="shuo-item">
  220. <view class="shuo-label">
  221. 生产来源:
  222. </view>
  223. <view class="shuo-cont-blue">
  224. <span v-if="item.prodSouc == '1'" type="success"> 国产 </span>
  225. <span v-if="item.prodSouc == '2'" type="danger"> 进口 </span>
  226. </view>
  227. </view>
  228. </view>
  229. <view class="inventory-item">
  230. <view class="shuo-item-name">
  231. <view class="shuo-label">
  232. 生产企业:
  233. </view>
  234. <view class="shuo-cont">
  235. {{item.prodEntp}}
  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[0].stas=='B'||listData[0].stas=='C'">
  245. <button type="default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"
  246. @click.stop="orderAcept('dev')" v-if="listData[0].stas=='B'">开始配送</button>
  247. <button type="default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"
  248. @click.stop="orderAcept('suc')" v-if="listData[0].stas=='C'">配送完成</button>
  249. </view>
  250. </view>
  251. </template>
  252. <script>
  253. import {
  254. mapState,
  255. mapMutations,
  256. mapActions
  257. } from 'vuex';
  258. import moment from "moment";
  259. const paging = {
  260. current: 1,
  261. size: 10000
  262. };
  263. export default {
  264. data() {
  265. return {
  266. listData: [],
  267. detailsData: [],
  268. type: "",
  269. control: true,
  270. maxCount: 1,
  271. compressSize: 3,
  272. imageSize: 2,
  273. compressQuality: 0.8,
  274. compressWidth: 375,
  275. sourceType: [],
  276. uploadTask: null,
  277. media: [], //数据源
  278. fileID: ""
  279. }
  280. },
  281. computed: {
  282. ...mapState(['acceptDetaData', 'acceptDetail'])
  283. },
  284. onShow() {
  285. let that = this;
  286. this.$forceUpdate();
  287. uni.getStorage({
  288. key: 'deliveredDetail',
  289. success: function(res) {
  290. that.listData = [
  291. res.data
  292. ];
  293. }
  294. });
  295. },
  296. mounted() {
  297. this.$nextTick(() => {
  298. this.getData();
  299. })
  300. },
  301. methods: {
  302. ...mapActions([]),
  303. ...mapMutations(['setMentItemData', 'setRefusaData']),
  304. chooseFile(data) {
  305. let fileCName = data[0].file.path.split('/');
  306. let fileuop = fileCName[fileCName.length - 1];
  307. this.$http('delivery.uploadFile', {
  308. fileName: `接收文件.${fileuop.split('.')[1]}`,
  309. itemcode: 'spd',
  310. fileContent: data[0].src
  311. }).then((res) => {
  312. if (res.success == true) {
  313. this.fileID = res.data.id;
  314. data[0].status = 'success'
  315. data[0].progress = '上传成功'
  316. }
  317. })
  318. },
  319. // 删除图片
  320. mediaDelete(val) {
  321. this.fileID = "";
  322. },
  323. getData() {
  324. this.$http('delivery.getListDetalData', {
  325. stooutId: this.listData[0].stooutId,
  326. soucStroomId: this.listData[0].soucStroomId,
  327. }, '加载中', true).then((res) => {
  328. if (res.success == true) {
  329. this.detailsData = res.data.records;
  330. }
  331. })
  332. },
  333. //确定验收
  334. dialogConfirm() {
  335. this.$http('delivery.subMitData', {
  336. stooutId: this.listData[0].stooutId,
  337. type: this.type,
  338. fileId: this.fileID
  339. }, '加载中', true).then((res) => {
  340. if (res.success == true) {
  341. this.$refs.popup.close();
  342. uni.redirectTo({
  343. url: '/pages/delivery/index',
  344. success: function(res) {
  345. console.log(res, "res")
  346. }
  347. });
  348. }
  349. })
  350. },
  351. //验收按钮触发
  352. orderAcept(type) {
  353. if (this.fileID == "" && type == 'suc') {
  354. uni.showToast({
  355. title: '请上传接收文件',
  356. icon: 'none',
  357. }, );
  358. return;
  359. }
  360. this.$refs.popup.open();
  361. this.type = type;
  362. },
  363. dialogClose() {
  364. this.$refs.popup.close();
  365. },
  366. //日期格式化
  367. forMatTime(time) {
  368. return moment(time).format("YYYY-MM-DD");
  369. },
  370. //跳转拣货明细详情
  371. itemDetails(item, index) {
  372. uni.setStorage({
  373. key: 'pickIngData',
  374. data: {
  375. ...item,
  376. stooutId: this.listData[0].stooutId
  377. }
  378. });
  379. uni.navigateTo({
  380. url: '/pages/pickingview/index',
  381. success: function(res) {
  382. console.log(res, "res")
  383. }
  384. });
  385. },
  386. },
  387. watch: {
  388. }
  389. }
  390. </script>
  391. <style lang="scss" scoped>
  392. .query-wrap {
  393. width: 100%;
  394. height: 100%;
  395. padding: 20rpx;
  396. box-sizing: border-box;
  397. background-color: #F1F1F1;
  398. overflow-y: scroll;
  399. overflow-x: hidden;
  400. position: relative;
  401. padding-bottom: 200rpx;
  402. .botm-btn {
  403. width: 100%;
  404. height: 120rpx;
  405. background-color: #fff;
  406. position: fixed;
  407. left: 0;
  408. bottom: 0;
  409. padding-top: 40rpx;
  410. }
  411. .time-view {
  412. height: 350rpx;
  413. background-color: #fff;
  414. padding: 50rpx 50rpx 0 50rpx;
  415. box-sizing: border-box;
  416. .btn-view {
  417. width: 100%;
  418. height: 100rpx;
  419. margin-top: 100rpx;
  420. display: flex;
  421. justify-content: space-around;
  422. }
  423. }
  424. }
  425. .upload-file-wrap {
  426. margin-top: 20rpx;
  427. width: 100%;
  428. height: 280rpx;
  429. .tit-label {
  430. color: rgba(16, 16, 16, 1);
  431. font-size: 28rpx;
  432. text-align: left;
  433. font-family: PingFangSC-regular;
  434. font-weight: bold;
  435. }
  436. .file-wrap {
  437. width: 100%;
  438. height: 217rpx;
  439. margin-top: 20rpx;
  440. }
  441. }
  442. uni-page-body {
  443. width: 100%;
  444. height: 100%;
  445. }
  446. </style>