detail.vue 10 KB

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