detail.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  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.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. {{orderInfo.createName || '-'}}
  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. {{orderInfo.operName || '-'}}
  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.submitTime}}
  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" :show-print="true" @print="(e) => handlePrint(e.id,'2',status)">
  103. <view class="num-box">
  104. <view class="num-box-text">已确认出库数量</view>
  105. <u-number-box v-model="item.actualQuantityInStorage" disabled min="0" :inputWidth="56" :max="item.inventory">
  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. <!-- 打印条码弹框 -->
  120. <print-pop :show.sync="blePrintPop.show" :info="blePrintPop.data" @confirm="startPrint"></print-pop>
  121. <!-- 选择蓝牙设备弹框 -->
  122. <ble-pop :show.sync="bleSelectPop.show" :list="discoveredDevices" @close="closeBleSelectPop" @refresh="refreshBleDevice" @selectItem="handleSelectBle"></ble-pop>
  123. <ble-tip-pop v-model="bleErrorTipPop.show" :is-center="true" @confirm="bleErrorTipConfirm" :content="bleErrorTipPop.content" :extraText="bleErrorTipPop.extraText"> </ble-tip-pop>
  124. </view>
  125. </template>
  126. <script>
  127. import goodItem from '@/components/good-item/good-item.vue'
  128. import {orderDetail, orderInfo} from '@/common/request/apis/purchase'
  129. import {mapGetters} from 'vuex'
  130. import blePrintMixin from '@/common/mixins/blePrintMixin.js'
  131. export default {
  132. mixins: [blePrintMixin],
  133. components: {
  134. goodItem,
  135. },
  136. data() {
  137. return {
  138. errorShow:false,
  139. successShow:false,
  140. isUnfold: true, //是否展开
  141. orderInfo: {},
  142. goodsList: [],
  143. status: null
  144. }
  145. },
  146. onLoad(e) {
  147. this.status = e.status
  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. item.materialNumber = 0
  174. })
  175. this.goodsList = res.data.rows
  176. }
  177. })
  178. },
  179. submitClick() {
  180. },
  181. confirm() {
  182. this.errorShow = false
  183. },
  184. backClick() {
  185. },
  186. // 扫码确认
  187. scanConfirm() {
  188. },
  189. manualClick() {
  190. this.goodsShow = true
  191. },
  192. toDetail(val) {
  193. uni.navigateTo({
  194. url:`/pages/goods/detail?id=${val.id}&name=${val.materialName}&materialId=${val.materialId}`
  195. })
  196. }
  197. }
  198. }
  199. </script>
  200. <style lang="scss" scoped>
  201. .deliver-page {
  202. min-height: 100vh;
  203. background-color: #F0F6FB;
  204. padding-bottom: 130rpx;
  205. .container_main {
  206. padding: 24rpx;
  207. .info-box {
  208. background-color: #fff;
  209. border-radius: 16rpx 16rpx 0 0;
  210. padding: 24rpx 24rpx 0 24rpx;
  211. .info-line {
  212. border-bottom: 1px solid #F4F4F4;
  213. min-height: 92rpx;
  214. color: #333;
  215. font-family: "PingFang SC";
  216. font-size: 28rpx;
  217. font-weight: 400;
  218. display: flex;
  219. align-items: center;
  220. &-label {
  221. width: 162rpx;
  222. }
  223. .must-box {
  224. color: #FF3B1D;
  225. }
  226. }
  227. }
  228. .min-height {
  229. height: 300rpx;
  230. overflow: hidden;
  231. }
  232. .btn-box {
  233. height: 112rpx;
  234. display: flex;
  235. align-items: center;
  236. justify-content: center;
  237. background-color: #fff;
  238. border-radius: 0 0 16rpx 16rpx;
  239. .btn-cont {
  240. display: flex;
  241. align-items: center;
  242. justify-content: center;
  243. width: 154rpx;
  244. height: 56rpx;
  245. border-radius: 120rpx;
  246. border: 1px solid #D9D9D9;
  247. color: #666;
  248. font-family: "PingFang SC";
  249. font-size: 28rpx;
  250. font-weight: 400;
  251. }
  252. }
  253. .cargo-list {
  254. padding: 24rpx 0;
  255. background-color: #fff;
  256. margin-top: 24rpx;
  257. border-radius: 16rpx;
  258. .cargo-list-title {
  259. font-family: "PingFang SC";
  260. font-size: 32rpx;
  261. font-style: normal;
  262. font-weight: bold;
  263. display: flex;
  264. align-items: center;
  265. position: relative;
  266. padding-left: 50rpx;
  267. &::after {
  268. content: '';
  269. display: block;
  270. width: 6rpx;
  271. height: 30rpx;
  272. border-radius: 100px;
  273. background: #0256FF;
  274. position: absolute;
  275. top: 50%;
  276. left: 24rpx;
  277. transform: translateY(-50%);
  278. }
  279. .cargo-list-title-tips {
  280. color: #0256FF;
  281. font-size: 24rpx;
  282. font-weight: 400;
  283. }
  284. }
  285. .num-box {
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-between;
  289. padding: 0 48rpx 0 26rpx;
  290. .num-box-text {
  291. color: #666;
  292. font-family: "PingFang SC";
  293. font-size: 28rpx;
  294. font-weight: 400;
  295. }
  296. .input {
  297. width: 112rpx;
  298. text-align: center;
  299. border-bottom: 1px solid #DADADA;
  300. margin: 0 8rpx;
  301. }
  302. .minus {
  303. width: 40rpx;
  304. height: 40rpx;
  305. border-radius: 8rpx;
  306. border: 1px solid #DADADA;
  307. display: flex;
  308. align-items: center;
  309. justify-content: center;
  310. }
  311. .plus {
  312. width: 40rpx;
  313. height: 40rpx;
  314. border-radius: 8rpx;
  315. background-color: #DADADA;
  316. display: flex;
  317. align-items: center;
  318. justify-content: center;
  319. }
  320. }
  321. }
  322. }
  323. .footer-box {
  324. background-color: #fff;
  325. height: 126rpx;
  326. position: fixed;
  327. bottom: 0;
  328. left: 0;
  329. right: 0;
  330. display: flex;
  331. align-items: center;
  332. justify-content: space-between;
  333. padding: 0 40rpx 0 60rpx;
  334. .footer-box-l {
  335. color: #666;
  336. font-family: "PingFang SC";
  337. font-size: 28rpx;
  338. font-weight: 400;
  339. }
  340. .submitBtn {
  341. width: 362rpx;
  342. height: 76rpx;
  343. border-radius: 16rpx;
  344. background: #0256FF;
  345. color: #FFF;
  346. font-size: 28rpx;
  347. font-weight: 500;
  348. margin: 0;
  349. }
  350. }
  351. }
  352. </style>