go-audit.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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. </u-number-box>
  131. </view>
  132. </good-item>
  133. </block>
  134. </view>
  135. </view>
  136. <view class="footer-box">
  137. <u-button class="cancelBtn" @tap="showReject = true">驳回</u-button>
  138. <u-button class="submitBtn">复核通过</u-button>
  139. </view>
  140. <!-- 打印条码弹框 -->
  141. <print-pop
  142. :show.sync="blePrintPop.show"
  143. :info="blePrintPop.data"
  144. @confirm="startPrint"
  145. ></print-pop>
  146. <!-- 选择蓝牙设备弹框 -->
  147. <ble-pop
  148. :show.sync="bleSelectPop.show"
  149. :list="discoveredDevices"
  150. @close="closeBleSelectPop"
  151. @refresh="refreshBleDevice"
  152. @selectItem="handleSelectBle"
  153. ></ble-pop>
  154. <ble-tip-pop
  155. v-model="bleErrorTipPop.show"
  156. :is-center="true"
  157. @confirm="bleErrorTipConfirm"
  158. :content="bleErrorTipPop.content"
  159. :extraText="bleErrorTipPop.extraText"
  160. >
  161. </ble-tip-pop>
  162. <rejectPop :show.sync="showReject" />
  163. </view>
  164. </template>
  165. <script>
  166. import goodItem from "@/components/good-item/good-item.vue";
  167. import { orderDetail, orderInfo } from "@/common/request/apis/purchase";
  168. import { mapGetters } from "vuex";
  169. import blePrintMixin from "@/common/mixins/blePrintMixin.js";
  170. import rejectPop from "./components/reject-pop.vue";
  171. export default {
  172. mixins: [blePrintMixin],
  173. components: {
  174. goodItem,
  175. rejectPop,
  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. showReject: false,
  187. };
  188. },
  189. onLoad(e) {
  190. this.status = e.status;
  191. this.getOrderInfo(e.id);
  192. this.getOrderDetail(e.id);
  193. },
  194. computed: {
  195. ...mapGetters(["depotInfo"]),
  196. },
  197. methods: {
  198. getOrderInfo(id) {
  199. orderInfo(id).then((res) => {
  200. if (res.code == 200) {
  201. this.orderInfo = res.data;
  202. }
  203. });
  204. },
  205. getOrderDetail(id) {
  206. orderDetail(id).then((res) => {
  207. if (res.code == 200) {
  208. res.data.rows.forEach((item) => {
  209. if (item.imgName && item.imgName.length > 0) {
  210. item.imgNameArr = item.imgName.split(",");
  211. } else {
  212. item.imgNameArr = [];
  213. }
  214. });
  215. this.goodsList = res.data.rows;
  216. console.log("this.goodsList==========", this.goodsList);
  217. }
  218. });
  219. },
  220. submitClick() {},
  221. confirm() {
  222. this.errorShow = false;
  223. },
  224. backClick() {},
  225. // 扫码确认
  226. scanConfirm() {},
  227. manualClick() {
  228. this.goodsShow = true;
  229. },
  230. toDetail(val) {
  231. uni.navigateTo({
  232. url: `/pages/goods/detail?id=${val.id}&name=${val.materialName}&materialId=${val.materialId}`,
  233. });
  234. },
  235. },
  236. };
  237. </script>
  238. <style lang="scss" scoped>
  239. .deliver-page {
  240. min-height: 100vh;
  241. background-color: #f0f6fb;
  242. padding-bottom: 130rpx;
  243. .container_main {
  244. padding: 24rpx;
  245. .info-box {
  246. background-color: #fff;
  247. border-radius: 16rpx 16rpx 0 0;
  248. padding: 24rpx 24rpx 0 24rpx;
  249. .info-line {
  250. border-bottom: 1px solid #f4f4f4;
  251. min-height: 92rpx;
  252. color: #333;
  253. font-family: "PingFang SC";
  254. font-size: 28rpx;
  255. font-weight: 400;
  256. display: flex;
  257. align-items: center;
  258. &-label {
  259. width: 162rpx;
  260. }
  261. .must-box {
  262. color: #ff3b1d;
  263. }
  264. }
  265. }
  266. .min-height {
  267. height: 300rpx;
  268. overflow: hidden;
  269. }
  270. .btn-box {
  271. height: 112rpx;
  272. display: flex;
  273. align-items: center;
  274. justify-content: center;
  275. background-color: #fff;
  276. border-radius: 0 0 16rpx 16rpx;
  277. .btn-cont {
  278. display: flex;
  279. align-items: center;
  280. justify-content: center;
  281. width: 154rpx;
  282. height: 56rpx;
  283. border-radius: 120rpx;
  284. border: 1px solid #d9d9d9;
  285. color: #666;
  286. font-family: "PingFang SC";
  287. font-size: 28rpx;
  288. font-weight: 400;
  289. }
  290. }
  291. .cargo-list {
  292. padding: 24rpx 0;
  293. background-color: #fff;
  294. margin-top: 24rpx;
  295. border-radius: 16rpx;
  296. .cargo-list-title {
  297. font-family: "PingFang SC";
  298. font-size: 32rpx;
  299. font-style: normal;
  300. font-weight: bold;
  301. display: flex;
  302. align-items: center;
  303. position: relative;
  304. padding-left: 50rpx;
  305. &::after {
  306. content: "";
  307. display: block;
  308. width: 6rpx;
  309. height: 30rpx;
  310. border-radius: 100px;
  311. background: #0256ff;
  312. position: absolute;
  313. top: 50%;
  314. left: 24rpx;
  315. transform: translateY(-50%);
  316. }
  317. .cargo-list-title-tips {
  318. color: #0256ff;
  319. font-size: 24rpx;
  320. font-weight: 400;
  321. }
  322. }
  323. .num-box {
  324. display: flex;
  325. align-items: center;
  326. justify-content: space-between;
  327. padding: 0 48rpx 0 26rpx;
  328. .num-box-text {
  329. color: #666;
  330. font-family: "PingFang SC";
  331. font-size: 28rpx;
  332. font-weight: 400;
  333. }
  334. .input {
  335. width: 112rpx;
  336. text-align: center;
  337. border-bottom: 1px solid #dadada;
  338. margin: 0 8rpx;
  339. }
  340. .minus {
  341. width: 40rpx;
  342. height: 40rpx;
  343. border-radius: 8rpx;
  344. border: 1px solid #dadada;
  345. display: flex;
  346. align-items: center;
  347. justify-content: center;
  348. }
  349. .plus {
  350. width: 40rpx;
  351. height: 40rpx;
  352. border-radius: 8rpx;
  353. background-color: #dadada;
  354. display: flex;
  355. align-items: center;
  356. justify-content: center;
  357. }
  358. }
  359. }
  360. }
  361. .footer-box {
  362. background-color: #fff;
  363. height: 176rpx;
  364. position: fixed;
  365. bottom: 0;
  366. left: 0;
  367. right: 0;
  368. display: flex;
  369. align-items: center;
  370. justify-content: center;
  371. .cancelBtn {
  372. width: 244rpx;
  373. height: 80rpx;
  374. border-radius: 16rpx;
  375. color: #666;
  376. font-family: "PingFang SC";
  377. font-size: 32rpx;
  378. font-weight: 500;
  379. margin-right: 20rpx;
  380. }
  381. .submitBtn {
  382. width: 244rpx;
  383. height: 80rpx;
  384. border-radius: 16rpx;
  385. background: #0256ff;
  386. color: #fff;
  387. font-size: 32rpx;
  388. font-weight: 500;
  389. }
  390. }
  391. }
  392. </style>