detail.vue 4.3 KB

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