receive-detail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view style="margin: 0rpx 40rpx 0" class="container">
  3. <view class="my2 p3 bg-color-white" style="border-radius: 16rpx">
  4. <view class="f-size-32 f-weight-6 py2 mb-2 title">领用信息</view>
  5. <detail-list-item title="领用单号">{{ model.pickNo }}</detail-list-item>
  6. <!-- <detail-list-item title="领用类型">{{ $BaseTool.Object.getField(typeMap, model.type) }}</detail-list-item>-->
  7. <detail-list-item title="领用用途">{{ model.reason }}</detail-list-item>
  8. <detail-list-item title="仓库">{{ model.storeName }}</detail-list-item>
  9. <detail-list-item title="总价">{{ model.totalPrice }}</detail-list-item>
  10. <detail-list-item title="领用人">{{ model.pickUserName }}</detail-list-item>
  11. <detail-list-item title="领用说明">{{ model.reason }}</detail-list-item>
  12. <view class="f-size-32 f-weight-6 py2 mb-2 title">领用明细</view>
  13. <template v-for="(detail,index) in model.detailList">
  14. <view :key="index">
  15. <u-line color="#0082ff" />
  16. <detail-list-item title="备品名称">{{ detail.spareName }}</detail-list-item>
  17. <detail-list-item title="领用数量">{{ detail.num }}</detail-list-item>
  18. <detail-list-item title="单价">{{ detail.price }}</detail-list-item>
  19. <detail-list-item title="总价">{{ detail.totalPrice }}</detail-list-item>
  20. </view>
  21. </template>
  22. </view>
  23. <view class="m3" v-if="isConfirm">
  24. <u-button @click="submit" type="primary" shape="circle">提交</u-button>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import DetailListItem from '@/components/detail-list/DescriptionList'
  30. export default {
  31. components: { DetailListItem },
  32. data() {
  33. return {
  34. model: {
  35. 'pickNo': null,
  36. 'type': null,
  37. 'repairId': null,
  38. 'repaireNo': null,
  39. 'pickUserId': null,
  40. 'pickUserName': null,
  41. 'storeId': null,
  42. 'storeName': null,
  43. 'reason': null,
  44. 'remark': null,
  45. 'status': null,
  46. 'createdUserId': null,
  47. 'updateUserId': null,
  48. 'updateTime': null,
  49. 'createdUserName': null,
  50. 'updateUserName': null
  51. },
  52. isConfirm: false,
  53. typeMap: {},
  54. statusMap: {}
  55. };
  56. },
  57. created () {
  58. // 下拉框map
  59. this.isConfirm = false;
  60. this.typeMap = this.$DictCache.getLabelByValueMapByType(this.$DictCache.TYPE.SPARE_PICK_FORM_TYPE)
  61. this.statusMap = this.$DictCache.getLabelByValueMapByType(this.$DictCache.TYPE.SPARE_PICK_FORM_STATUS)
  62. },
  63. onLoad(options) {
  64. this.isConfirm = options.confirm === 1 || options.confirm === '1';
  65. this.$Http.fetchSparePickForm({ id: options.id }).then(res => {
  66. this.model = res.data;
  67. if(this.model.status == 1){
  68. this.isConfirm = true
  69. }
  70. });
  71. },
  72. methods: {
  73. submit() {
  74. this.$Http.updateToOutStore({ id: this.model.id })
  75. .then(() => {
  76. this.isConfirm = false
  77. uni.showToast({ icon: 'none', title: '提交成功,请等待出库' })
  78. }).catch(() => {
  79. })
  80. }
  81. }
  82. };
  83. </script>
  84. <style scoped lang="less">
  85. page {
  86. background-color: #f4f4f4;
  87. }
  88. .container {
  89. padding-bottom: 100rpx;
  90. .title {
  91. border-bottom: 1rpx solid #f4f4f4;
  92. color: #0082ff;
  93. }
  94. .p-fixed {
  95. border-top: 1rpx solid #f4f4f4;
  96. height: 100rpx;
  97. .common {
  98. padding: 15rpx 100rpx;
  99. border-radius: 30rpx;
  100. background-color: #0082ff;
  101. color: #fff;
  102. &:last-of-type {
  103. background-color: #fff;
  104. border: 1rpx solid #0082ff;
  105. color: #0082ff;
  106. }
  107. }
  108. }
  109. .footer {
  110. bottom: 0;
  111. left: 0;
  112. right: 0;
  113. background-color: #fff;
  114. }
  115. }
  116. </style>