detail.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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. {{cangName}}
  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.supplierName}}
  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.goodsQuantity}}
  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.goodsTypeCount}}
  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. {{orderInfo.createTime}}
  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.createName || '-'}}
  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. {{orderInfo.subType}}
  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.operName || '-'}}
  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.remark || '-'}}
  86. </view>
  87. </view>
  88. <view class="info-line">
  89. <view class="info-line-label">
  90. <text>入库时间</text>
  91. </view>
  92. <view class="info-line-value">
  93. {{orderInfo.operTime}}
  94. </view>
  95. </view>
  96. </view>
  97. <view class="btn-box">
  98. <view class="btn-cont" @click="isUnfold = !isUnfold">
  99. <text>{{isUnfold ? '收起' : '展开'}}</text>
  100. <u-icon :name="isUnfold?'arrow-up':'arrow-down'"></u-icon>
  101. </view>
  102. </view>
  103. <!-- 货物清单 -->
  104. <view class="cargo-list">
  105. <view class="cargo-list-title">
  106. <view>入库货物清单</view>
  107. <view class="cargo-list-title-tips">(轻触货物查看详情)</view>
  108. </view>
  109. <block v-for="(item,i) in goodsList" :key="i">
  110. <good-item :item="item" @toDetail="toDetail">
  111. <view class="num-box">
  112. <view class="num-box-text">已确认入库数量</view>
  113. <u-number-box v-model="item.actualQuantityInStorage" disabled>
  114. <view slot="minus" class="minus">
  115. <u-icon name="minus" color="#DADADA" size="12"></u-icon>
  116. </view>
  117. <text slot="input" class="input">{{item.actualQuantityInStorage ? (item.actualQuantityInStorage*1).toFixed(0) : 0}}</text>
  118. <view slot="plus" class="plus">
  119. <u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
  120. </view>
  121. </u-number-box>
  122. </view>
  123. </good-item>
  124. </block>
  125. </view>
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. import goodItem from '@/components/good-item/good-item.vue'
  131. import {orderDetail, orderInfo} from '@/common/request/apis/purchase'
  132. import {mapGetters} from 'vuex'
  133. export default {
  134. components: {
  135. goodItem,
  136. },
  137. data() {
  138. return {
  139. errorShow:false,
  140. successShow:false,
  141. value:0,
  142. isUnfold: true, //是否展开
  143. orderInfo: {},
  144. goodsList: []
  145. }
  146. },
  147. onLoad(e) {
  148. this.getOrderInfo(e.id)
  149. this.getOrderDetail(e.id)
  150. },
  151. computed:{
  152. ...mapGetters(['cangName']),
  153. },
  154. methods:{
  155. getOrderInfo(id) {
  156. orderInfo(id)
  157. .then(res=>{
  158. if(res.code == 200) {
  159. this.orderInfo = res.data
  160. }
  161. })
  162. },
  163. getOrderDetail(id) {
  164. orderDetail(id)
  165. .then(res=>{
  166. if(res.code == 200) {
  167. res.data.rows.forEach(item=>{
  168. if(item.imgName && item.imgName.length >0) {
  169. item.imgNameArr = item.imgName.split(",")
  170. }else {
  171. item.imgNameArr = []
  172. }
  173. })
  174. this.goodsList = res.data.rows
  175. }
  176. })
  177. },
  178. submitClick() {
  179. },
  180. confirm() {
  181. this.errorShow = false
  182. },
  183. backClick() {
  184. },
  185. // 扫码确认
  186. scanConfirm() {
  187. },
  188. manualClick() {
  189. this.goodsShow = true
  190. },
  191. toDetail(val) {
  192. uni.navigateTo({
  193. url:`/pages/goods/detail?id=${val.id}&name=${val.materialName}&materialId=${val.materialId}`
  194. })
  195. }
  196. }
  197. }
  198. </script>
  199. <style lang="scss" scoped>
  200. .deliver-page {
  201. min-height: 100vh;
  202. background-color: #F0F6FB;
  203. padding-bottom: 130rpx;
  204. .container_main {
  205. padding: 24rpx;
  206. .info-box {
  207. background-color: #fff;
  208. border-radius: 16rpx 16rpx 0 0;
  209. padding: 24rpx 24rpx 0 24rpx;
  210. .info-line {
  211. border-bottom: 1px solid #F4F4F4;
  212. min-height: 92rpx;
  213. color: #333;
  214. font-family: "PingFang SC";
  215. font-size: 28rpx;
  216. font-weight: 400;
  217. display: flex;
  218. align-items: center;
  219. &-label {
  220. width: 162rpx;
  221. }
  222. .must-box {
  223. color: #FF3B1D;
  224. }
  225. }
  226. }
  227. .min-height {
  228. height: 300rpx;
  229. overflow: hidden;
  230. }
  231. .btn-box {
  232. height: 112rpx;
  233. display: flex;
  234. align-items: center;
  235. justify-content: center;
  236. background-color: #fff;
  237. border-radius: 0 0 16rpx 16rpx;
  238. .btn-cont {
  239. display: flex;
  240. align-items: center;
  241. justify-content: center;
  242. width: 154rpx;
  243. height: 56rpx;
  244. border-radius: 120rpx;
  245. border: 1px solid #D9D9D9;
  246. color: #666;
  247. font-family: "PingFang SC";
  248. font-size: 28rpx;
  249. font-weight: 400;
  250. }
  251. }
  252. .cargo-list {
  253. padding: 24rpx 0;
  254. background-color: #fff;
  255. margin-top: 24rpx;
  256. border-radius: 16rpx;
  257. .cargo-list-title {
  258. font-family: "PingFang SC";
  259. font-size: 32rpx;
  260. font-style: normal;
  261. font-weight: bold;
  262. display: flex;
  263. align-items: center;
  264. position: relative;
  265. padding-left: 50rpx;
  266. &::after {
  267. content: '';
  268. display: block;
  269. width: 6rpx;
  270. height: 30rpx;
  271. border-radius: 100px;
  272. background: #0256FF;
  273. position: absolute;
  274. top: 50%;
  275. left: 24rpx;
  276. transform: translateY(-50%);
  277. }
  278. .cargo-list-title-tips {
  279. color: #0256FF;
  280. font-size: 24rpx;
  281. font-weight: 400;
  282. }
  283. }
  284. .num-box {
  285. display: flex;
  286. align-items: center;
  287. justify-content: space-between;
  288. padding: 0 48rpx 0 26rpx;
  289. .num-box-text {
  290. color: #666;
  291. font-family: "PingFang SC";
  292. font-size: 28rpx;
  293. font-weight: 400;
  294. }
  295. .input {
  296. width: 112rpx;
  297. text-align: center;
  298. border-bottom: 1px solid #DADADA;
  299. margin: 0 8rpx;
  300. }
  301. .minus {
  302. width: 40rpx;
  303. height: 40rpx;
  304. border-radius: 8rpx;
  305. border: 1px solid #DADADA;
  306. display: flex;
  307. align-items: center;
  308. justify-content: center;
  309. }
  310. .plus {
  311. width: 40rpx;
  312. height: 40rpx;
  313. border-radius: 8rpx;
  314. background-color: #DADADA;
  315. display: flex;
  316. align-items: center;
  317. justify-content: center;
  318. }
  319. }
  320. }
  321. }
  322. .footer-box {
  323. background-color: #fff;
  324. height: 126rpx;
  325. position: fixed;
  326. bottom: 0;
  327. left: 0;
  328. right: 0;
  329. display: flex;
  330. align-items: center;
  331. justify-content: space-between;
  332. padding: 0 40rpx 0 60rpx;
  333. .footer-box-l {
  334. color: #666;
  335. font-family: "PingFang SC";
  336. font-size: 28rpx;
  337. font-weight: 400;
  338. }
  339. .submitBtn {
  340. width: 362rpx;
  341. height: 76rpx;
  342. border-radius: 16rpx;
  343. background: #0256FF;
  344. color: #FFF;
  345. font-size: 28rpx;
  346. font-weight: 500;
  347. margin: 0;
  348. }
  349. }
  350. }
  351. </style>