detail.vue 8.8 KB

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