detail.vue 10 KB

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