detail.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='详情'></cus-header>
  4. <div class="boxs">
  5. <div class="box">
  6. <div class="box_item">
  7. <div class="left">项目订单号</div>
  8. <div class="right">{{dto.orderNo2||''}}</div>
  9. </div>
  10. <div class="box_item">
  11. <div class="left">巡检地点</div>
  12. <div class="right">{{dto.inspectionSite||''}}</div>
  13. </div>
  14. <div class="box_item">
  15. <div class="left">巡检任务</div>
  16. <div class="right">{{dto.inspectionTask||''}}</div>
  17. </div>
  18. <div class="box_item">
  19. <div class="left">巡检负责人</div>
  20. <div class="right">{{dto.inspector||''}}</div>
  21. </div>
  22. <div class="box_item">
  23. <div class="left">巡检时间</div>
  24. <div class="right">{{dto.startDate2||''}}</div>
  25. </div>
  26. </div>
  27. <div class="box">
  28. <div class="box_item">
  29. <div class="left">巡检结果</div>
  30. <div class="right">{{dto.status===0?'正常':'异常'}}</div>
  31. </div>
  32. <div class="box_item2">
  33. <div class="top">备注</div>
  34. <div class="bottom2">{{dto.remark||''}}</div>
  35. </div>
  36. </div>
  37. <div class="box">
  38. <div class="box_item2">
  39. <div class="top">巡检打卡</div>
  40. <div class="bottom2">
  41. <image :src="dto.inspectionFile" v-if="dto.inspectionFile" style="width: 180rpx;height: 180rpx;"></image>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="bottom">
  47. <div class="btn" @tap="back">返回</div>
  48. </div>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. data(){
  54. return {
  55. id:'',
  56. dto:{},
  57. projectList:[],
  58. typeList:[],
  59. imgList:[],
  60. }
  61. },
  62. async onLoad(option) {
  63. this.id = option.id;
  64. await this.getOrderList();
  65. this.getDetail();
  66. },
  67. methods:{
  68. getOrderList(){
  69. return new Promise((resolve,reject)=>{
  70. this.$api.get('/wms/project/getOrderPage',{page:1,limit:-1}).then(res=>{
  71. if(res.data.code===0){
  72. this.projectList = res.data.data.list;
  73. resolve();
  74. }else this.$showToast(res.data.msg)
  75. })
  76. })
  77. },
  78. getDetail(){
  79. this.$api.get('/wms/order/inspection/'+this.id).then(res=>{
  80. if(res.data.code!==0) return this.$showToast(res.data.msg)
  81. this.dto = res.data.data;
  82. this.dto.startDate2 = new Date(this.dto.startDate).Format('yyyy-MM-dd');
  83. this.dto.orderNo2 = this.projectList.find(p=>p.id==this.dto.orderId)?.orderNo||'';
  84. })
  85. },
  86. back(){
  87. uni.navigateBack()
  88. }
  89. }
  90. }
  91. </script>
  92. <style scoped lang="less">
  93. .page{
  94. padding-bottom: 168rpx;
  95. background: #F4F8FB;
  96. .boxs{
  97. padding: 0 24rpx;
  98. .box{
  99. background: #FFFFFF;
  100. border-radius: 16rpx;
  101. margin-top: 20rpx;
  102. padding: 0 24rpx;
  103. }
  104. }
  105. .box_item{
  106. display: flex;
  107. align-items: center;
  108. justify-content: space-between;
  109. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECEEF5;
  110. padding: 24rpx 0;
  111. .left{
  112. font-family: PingFangSC, PingFang SC;
  113. font-weight: 400;
  114. font-size: 30rpx;
  115. color: #1D2129;
  116. line-height: 42rpx;
  117. }
  118. .right{
  119. font-family: PingFangSC, PingFang SC;
  120. font-weight: 400;
  121. font-size: 28rpx;
  122. color: #4E5969;
  123. line-height: 40rpx;
  124. text-align: right;
  125. }
  126. }
  127. .box_item2{
  128. .top{
  129. font-family: PingFangSC, PingFang SC;
  130. font-weight: 400;
  131. font-size: 30rpx;
  132. color: #1D2129;
  133. line-height: 42rpx;
  134. padding: 24rpx 0;
  135. }
  136. .bottom2{
  137. font-family: PingFangSC, PingFang SC;
  138. font-weight: 400;
  139. font-size: 28rpx;
  140. color: #4E5969;
  141. line-height: 40rpx;
  142. padding-bottom: 20rpx;
  143. }
  144. }
  145. .imgs{
  146. display: flex;
  147. justify-content: space-evenly;
  148. flex-wrap: wrap;
  149. margin-top: -20rpx;
  150. image{
  151. width: 180rpx;
  152. height: 180rpx;
  153. margin-top: 20rpx;
  154. }
  155. }
  156. .bottom{
  157. width: 100%;
  158. height: 148rpx;
  159. padding: 20rpx 48rpx;
  160. box-sizing: border-box;
  161. background: #FFFFFF;
  162. position: fixed;
  163. bottom: 0;
  164. left: 0;
  165. z-index: 9;
  166. .btn{
  167. width: 100%;
  168. height: 88rpx;
  169. background: #2E69EB;
  170. border-radius: 16rpx;
  171. font-family: PingFang-SC, PingFang-SC;
  172. font-weight: bold;
  173. font-size: 32rpx;
  174. color: #FFFFFF;
  175. line-height: 88rpx;
  176. text-align: center;
  177. }
  178. }
  179. }
  180. </style>