detail.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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="item.actualQuantityInStorage" 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">{{(item.actualQuantityInStorage * 1).toFixed(0) || 0}}</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. isUnfold: true, //是否展开
  133. orderInfo: {},
  134. goodsList: []
  135. }
  136. },
  137. onLoad(e) {
  138. this.getOrderInfo(e.id)
  139. this.getOrderDetail(e.id)
  140. },
  141. methods:{
  142. getOrderInfo(id) {
  143. orderInfo(id)
  144. .then(res=>{
  145. if(res.code == 200) {
  146. this.orderInfo = res.data
  147. }
  148. })
  149. },
  150. getOrderDetail(id) {
  151. orderDetail(id)
  152. .then(res=>{
  153. if(res.code == 200) {
  154. res.data.rows.forEach(item=>{
  155. if(item.imgName && item.imgName.length >0) {
  156. item.imgNameArr = item.imgName.split(",")
  157. }else {
  158. item.imgNameArr = []
  159. }
  160. item.materialNumber = 0
  161. })
  162. this.goodsList = res.data.rows
  163. }
  164. })
  165. },
  166. submitClick() {
  167. },
  168. confirm() {
  169. this.errorShow = false
  170. },
  171. backClick() {
  172. },
  173. // 扫码确认
  174. scanConfirm() {
  175. },
  176. manualClick() {
  177. this.goodsShow = true
  178. },
  179. toDetail() {
  180. uni.navigateTo({
  181. url:`/pages/goods/detail?id=${val.id}&name=${val.materialName}&materialId=${val.materialId}`
  182. })
  183. }
  184. }
  185. }
  186. </script>
  187. <style lang="scss" scoped>
  188. .deliver-page {
  189. min-height: 100vh;
  190. background-color: #F0F6FB;
  191. padding-bottom: 130rpx;
  192. .container_main {
  193. padding: 24rpx;
  194. .info-box {
  195. background-color: #fff;
  196. border-radius: 16rpx 16rpx 0 0;
  197. padding: 24rpx 24rpx 0 24rpx;
  198. .info-line {
  199. border-bottom: 1px solid #F4F4F4;
  200. min-height: 92rpx;
  201. color: #333;
  202. font-family: "PingFang SC";
  203. font-size: 28rpx;
  204. font-weight: 400;
  205. display: flex;
  206. align-items: center;
  207. &-label {
  208. width: 162rpx;
  209. }
  210. .must-box {
  211. color: #FF3B1D;
  212. }
  213. }
  214. }
  215. .min-height {
  216. height: 300rpx;
  217. overflow: hidden;
  218. }
  219. .btn-box {
  220. height: 112rpx;
  221. display: flex;
  222. align-items: center;
  223. justify-content: center;
  224. background-color: #fff;
  225. border-radius: 0 0 16rpx 16rpx;
  226. .btn-cont {
  227. display: flex;
  228. align-items: center;
  229. justify-content: center;
  230. width: 154rpx;
  231. height: 56rpx;
  232. border-radius: 120rpx;
  233. border: 1px solid #D9D9D9;
  234. color: #666;
  235. font-family: "PingFang SC";
  236. font-size: 28rpx;
  237. font-weight: 400;
  238. }
  239. }
  240. .cargo-list {
  241. padding: 24rpx 0;
  242. background-color: #fff;
  243. margin-top: 24rpx;
  244. border-radius: 16rpx;
  245. .cargo-list-title {
  246. font-family: "PingFang SC";
  247. font-size: 32rpx;
  248. font-style: normal;
  249. font-weight: bold;
  250. display: flex;
  251. align-items: center;
  252. position: relative;
  253. padding-left: 50rpx;
  254. &::after {
  255. content: '';
  256. display: block;
  257. width: 6rpx;
  258. height: 30rpx;
  259. border-radius: 100px;
  260. background: #0256FF;
  261. position: absolute;
  262. top: 50%;
  263. left: 24rpx;
  264. transform: translateY(-50%);
  265. }
  266. .cargo-list-title-tips {
  267. color: #0256FF;
  268. font-size: 24rpx;
  269. font-weight: 400;
  270. }
  271. }
  272. .num-box {
  273. display: flex;
  274. align-items: center;
  275. justify-content: space-between;
  276. padding: 0 48rpx 0 26rpx;
  277. .num-box-text {
  278. color: #666;
  279. font-family: "PingFang SC";
  280. font-size: 28rpx;
  281. font-weight: 400;
  282. }
  283. .input {
  284. width: 112rpx;
  285. text-align: center;
  286. border-bottom: 1px solid #DADADA;
  287. margin: 0 8rpx;
  288. }
  289. .minus {
  290. width: 40rpx;
  291. height: 40rpx;
  292. border-radius: 8rpx;
  293. border: 1px solid #DADADA;
  294. display: flex;
  295. align-items: center;
  296. justify-content: center;
  297. }
  298. .plus {
  299. width: 40rpx;
  300. height: 40rpx;
  301. border-radius: 8rpx;
  302. background-color: #DADADA;
  303. display: flex;
  304. align-items: center;
  305. justify-content: center;
  306. }
  307. }
  308. }
  309. }
  310. .footer-box {
  311. background-color: #fff;
  312. height: 126rpx;
  313. position: fixed;
  314. bottom: 0;
  315. left: 0;
  316. right: 0;
  317. display: flex;
  318. align-items: center;
  319. justify-content: space-between;
  320. padding: 0 40rpx 0 60rpx;
  321. .footer-box-l {
  322. color: #666;
  323. font-family: "PingFang SC";
  324. font-size: 28rpx;
  325. font-weight: 400;
  326. }
  327. .submitBtn {
  328. width: 362rpx;
  329. height: 76rpx;
  330. border-radius: 16rpx;
  331. background: #0256FF;
  332. color: #FFF;
  333. font-size: 28rpx;
  334. font-weight: 500;
  335. margin: 0;
  336. }
  337. }
  338. }
  339. </style>