detail.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <template>
  2. <view class="deliver-page">
  3. <u-navbar height="40px" title="拣货任务详情" bgColor="#0256FF" :titleStyle="{color:'#fff'}" leftIconColor="#fff" autoBack
  4. placeholder>
  5. </u-navbar>
  6. <view class="container_main">
  7. <view class="info-box" :class="isUnfold ? '':'min-height'">
  8. <view class="info-line">
  9. <view class="info-line-label">
  10. <text>出库单号</text>
  11. </view>
  12. <view class="info-line-value">
  13. {{orderInfo.number}}
  14. </view>
  15. </view>
  16. <view class="info-line">
  17. <view class="info-line-label">
  18. <text>发出仓库</text>
  19. </view>
  20. <view class="info-line-value">
  21. 我的仓库-暂无
  22. </view>
  23. </view>
  24. <view class="info-line">
  25. <view class="info-line-label">
  26. <text>出库数量</text>
  27. </view>
  28. <view class="info-line-value">
  29. {{orderInfo.goodsQuantity}}
  30. </view>
  31. </view>
  32. <view class="info-line">
  33. <view class="info-line-label">
  34. <text>出库种类</text>
  35. </view>
  36. <view class="info-line-value">
  37. {{orderInfo.goodsTypeCount}}
  38. </view>
  39. </view>
  40. <view class="info-line">
  41. <view class="info-line-label">
  42. <text>制单日期</text>
  43. </view>
  44. <view class="info-line-value">
  45. {{orderInfo.createTime}}
  46. </view>
  47. </view>
  48. <view class="info-line">
  49. <view class="info-line-label">
  50. <text>制单人</text>
  51. </view>
  52. <view class="info-line-value">
  53. 刘双强
  54. </view>
  55. </view>
  56. <view class="info-line">
  57. <view class="info-line-label">
  58. <text>出库类型</text>
  59. </view>
  60. <view class="info-line-value">
  61. {{orderInfo.subType}}
  62. </view>
  63. </view>
  64. <view class="info-line">
  65. <view class="info-line-label">
  66. <text>出库人</text>
  67. </view>
  68. <view class="info-line-value">
  69. 刘双美
  70. </view>
  71. </view>
  72. <view class="info-line">
  73. <view class="info-line-label">
  74. <text>备注信息</text>
  75. </view>
  76. <view class="info-line-value">
  77. {{orderInfo.remark || '-'}}
  78. </view>
  79. </view>
  80. <view class="info-line">
  81. <view class="info-line-label">
  82. <text>出库时间</text>
  83. </view>
  84. <view class="info-line-value">
  85. {{orderInfo.operTime}}
  86. </view>
  87. </view>
  88. </view>
  89. <view class="btn-box">
  90. <view class="btn-cont" @click="isUnfold = !isUnfold">
  91. <text>{{isUnfold ? '收起' : '展开'}}</text>
  92. <u-icon :name="isUnfold?'arrow-up':'arrow-down'"></u-icon>
  93. </view>
  94. </view>
  95. <!-- 货物清单 -->
  96. <view class="cargo-list">
  97. <view class="cargo-list-title">
  98. <view>出库货物清单</view>
  99. <view class="cargo-list-title-tips">(轻触货物查看详情)</view>
  100. </view>
  101. <block v-for="(item,i) in goodsList" :key="i">
  102. <good-item :item="item" @toDetail="toDetail">
  103. <view class="num-box">
  104. <view class="num-box-text">已确认出库数量</view>
  105. <u-number-box v-model="value" disabled>
  106. <view slot="minus" class="minus">
  107. <u-icon name="minus" color="#DADADA" size="12"></u-icon>
  108. </view>
  109. <text slot="input" class="input">{{value}}</text>
  110. <view slot="plus" class="plus">
  111. <u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
  112. </view>
  113. </u-number-box>
  114. </view>
  115. </good-item>
  116. </block>
  117. </view>
  118. </view>
  119. </view>
  120. </template>
  121. <script>
  122. import goodItem from '@/components/good-item/good-item.vue'
  123. import {orderDetail, orderInfo} from '@/common/request/apis/purchase'
  124. export default {
  125. components: {
  126. goodItem,
  127. },
  128. data() {
  129. return {
  130. errorShow:false,
  131. successShow:false,
  132. value:0,
  133. isUnfold: true, //是否展开
  134. orderInfo: {},
  135. goodsList: []
  136. }
  137. },
  138. onLoad(e) {
  139. this.getOrderInfo(e.id)
  140. this.getOrderDetail(e.id)
  141. },
  142. methods:{
  143. getOrderInfo(id) {
  144. orderInfo(id)
  145. .then(res=>{
  146. if(res.code == 200) {
  147. this.orderInfo = res.data
  148. }
  149. })
  150. },
  151. getOrderDetail(id) {
  152. orderDetail(id)
  153. .then(res=>{
  154. if(res.code == 200) {
  155. this.goodsList = res.data.rows
  156. }
  157. })
  158. },
  159. submitClick() {
  160. },
  161. confirm() {
  162. console.log('确定')
  163. this.errorShow = false
  164. },
  165. backClick() {
  166. },
  167. // 扫码确认
  168. scanConfirm() {
  169. },
  170. manualClick() {
  171. this.goodsShow = true
  172. },
  173. toDetail() {
  174. uni.navigateTo({
  175. url:'/pages/goods/detail'
  176. })
  177. }
  178. }
  179. }
  180. </script>
  181. <style lang="scss" scoped>
  182. .deliver-page {
  183. min-height: 100vh;
  184. background-color: #F0F6FB;
  185. padding-bottom: 130rpx;
  186. .container_main {
  187. padding: 24rpx;
  188. .info-box {
  189. background-color: #fff;
  190. border-radius: 16rpx 16rpx 0 0;
  191. padding: 24rpx 24rpx 0 24rpx;
  192. .info-line {
  193. border-bottom: 1px solid #F4F4F4;
  194. min-height: 92rpx;
  195. color: #333;
  196. font-family: "PingFang SC";
  197. font-size: 28rpx;
  198. font-weight: 400;
  199. display: flex;
  200. align-items: center;
  201. &-label {
  202. width: 162rpx;
  203. }
  204. .must-box {
  205. color: #FF3B1D;
  206. }
  207. }
  208. }
  209. .min-height {
  210. height: 300rpx;
  211. overflow: hidden;
  212. }
  213. .btn-box {
  214. height: 112rpx;
  215. display: flex;
  216. align-items: center;
  217. justify-content: center;
  218. background-color: #fff;
  219. border-radius: 0 0 16rpx 16rpx;
  220. .btn-cont {
  221. display: flex;
  222. align-items: center;
  223. justify-content: center;
  224. width: 154rpx;
  225. height: 56rpx;
  226. border-radius: 120rpx;
  227. border: 1px solid #D9D9D9;
  228. color: #666;
  229. font-family: "PingFang SC";
  230. font-size: 28rpx;
  231. font-weight: 400;
  232. }
  233. }
  234. .cargo-list {
  235. padding: 24rpx 0;
  236. background-color: #fff;
  237. margin-top: 24rpx;
  238. border-radius: 16rpx;
  239. .cargo-list-title {
  240. font-family: "PingFang SC";
  241. font-size: 32rpx;
  242. font-style: normal;
  243. font-weight: bold;
  244. display: flex;
  245. align-items: center;
  246. position: relative;
  247. padding-left: 50rpx;
  248. &::after {
  249. content: '';
  250. display: block;
  251. width: 6rpx;
  252. height: 30rpx;
  253. border-radius: 100px;
  254. background: #0256FF;
  255. position: absolute;
  256. top: 50%;
  257. left: 24rpx;
  258. transform: translateY(-50%);
  259. }
  260. .cargo-list-title-tips {
  261. color: #0256FF;
  262. font-size: 24rpx;
  263. font-weight: 400;
  264. }
  265. }
  266. .num-box {
  267. display: flex;
  268. align-items: center;
  269. justify-content: space-between;
  270. padding: 0 48rpx 0 26rpx;
  271. .num-box-text {
  272. color: #666;
  273. font-family: "PingFang SC";
  274. font-size: 28rpx;
  275. font-weight: 400;
  276. }
  277. .input {
  278. width: 112rpx;
  279. text-align: center;
  280. border-bottom: 1px solid #DADADA;
  281. margin: 0 8rpx;
  282. }
  283. .minus {
  284. width: 40rpx;
  285. height: 40rpx;
  286. border-radius: 8rpx;
  287. border: 1px solid #DADADA;
  288. display: flex;
  289. align-items: center;
  290. justify-content: center;
  291. }
  292. .plus {
  293. width: 40rpx;
  294. height: 40rpx;
  295. border-radius: 8rpx;
  296. background-color: #DADADA;
  297. display: flex;
  298. align-items: center;
  299. justify-content: center;
  300. }
  301. }
  302. }
  303. }
  304. .footer-box {
  305. background-color: #fff;
  306. height: 126rpx;
  307. position: fixed;
  308. bottom: 0;
  309. left: 0;
  310. right: 0;
  311. display: flex;
  312. align-items: center;
  313. justify-content: space-between;
  314. padding: 0 40rpx 0 60rpx;
  315. .footer-box-l {
  316. color: #666;
  317. font-family: "PingFang SC";
  318. font-size: 28rpx;
  319. font-weight: 400;
  320. }
  321. .submitBtn {
  322. width: 362rpx;
  323. height: 76rpx;
  324. border-radius: 16rpx;
  325. background: #0256FF;
  326. color: #FFF;
  327. font-size: 28rpx;
  328. font-weight: 500;
  329. margin: 0;
  330. }
  331. }
  332. }
  333. </style>