submitted_ministry.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view>
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" leftText="报工" @clickLeft="back"></uni-nav-bar>
  4. <!-- 待处理 -->
  5. <template v-if="detailsIng.length">
  6. <CellTip title="待处理"> </CellTip>
  7. <uni-collapse ref="collapse" v-for="item in detailsIng" :key="item.id">
  8. <uni-collapse-item :open="false" :typeOpen="false" titleStyle="background-color: #ffffff">
  9. <OrderDetail slot="typeOpenShow" :value1="item.equipmentName" :value2="item.equipmentPlace"
  10. :value3="item.maintainPart" :value4="'null'" :value5="worksheetInfo.executor.name"
  11. :value6="'null'">
  12. </OrderDetail>
  13. <view class="content-status" @click.stop>
  14. <view class="title cell font-grey">
  15. 保养项目
  16. </view>
  17. <view class="tip cell border-bottom">
  18. {{item.equipmentName}}{{item.equipmentPlace}}
  19. <text>{{item.maintainType == '1' ? '普通保养' : '润滑保养'}}</text>
  20. </view>
  21. <!-- 没有做过事项处理 -->
  22. <view class="cell " style="margin-top: 20rpx;">
  23. <text class="font-grey">保养周期:</text>
  24. <text>{{item.maintainCycle}}{{item.maintainCycleUnit}}</text>
  25. </view>
  26. <view class="cell ">
  27. <text class="font-grey">操作标准:</text>
  28. <!-- <text>{{item.maintainStandard}}</text> -->
  29. </view>
  30. <view class="cell ">
  31. <text class="font-grey">验收标准:</text>
  32. <text>{{item.maintainStandard}}</text>
  33. </view>
  34. <view class="cell ">
  35. <text class="font-grey">选择的备件:</text>
  36. <view v-for="items in item.maintainSpare">
  37. <Cell :title="items.spareName +'/'+ items.model" :more="'x'+ items.mun + items.unit">
  38. </Cell>
  39. </view>
  40. </view>
  41. <view class="btn-status">
  42. <view class="">
  43. 照片
  44. </view>
  45. <view>
  46. <text class="btn btn-warning">
  47. 报修
  48. </text>
  49. <text class="btn btn-success">
  50. 选择备品备件
  51. </text>
  52. <text class="btn btn-primary" @click="">
  53. 保养完成
  54. </text>
  55. </view>
  56. </view>
  57. </view>
  58. </uni-collapse-item>
  59. </uni-collapse>
  60. </template>
  61. <!-- 已处理 -->
  62. <template v-if="detailsEd.length">
  63. <CellTip title="已处理"> </CellTip>
  64. <uni-collapse ref="collapse" v-for="item in detailsEd" :key="item.id">
  65. <uni-collapse-item :open="false" :typeOpen="false" titleStyle="background-color: #ffffff">
  66. <OrderDetail slot="typeOpenShow" :value1="item.equipmentName" :value2="item.equipmentPlace"
  67. :value3="item.maintainPart" :value4="'null'" :value5="worksheetInfo.executor.name"
  68. :value6="'null'">
  69. </OrderDetail>
  70. <view class="content-status" @click.stop>
  71. <view class="title cell font-grey">
  72. 保养项目
  73. </view>
  74. <view class="tip cell border-bottom">
  75. {{item.equipmentName}}{{item.equipmentPlace}}
  76. <text>{{item.maintainType == '1' ? '普通保养' : '润滑保养'}}</text>
  77. </view>
  78. <!-- 没有做过事项处理 -->
  79. <view class="cell " style="margin-top: 20rpx;">
  80. <text class="font-grey">保养周期:</text>
  81. <text>{{item.maintainCycle}}{{item.maintainCycleUnit}}</text>
  82. </view>
  83. <view class="cell ">
  84. <text class="font-grey">操作标准:</text>
  85. <!-- <text>{{item.maintainStandard}}</text> -->
  86. </view>
  87. <view class="cell ">
  88. <text class="font-grey">验收标准:</text>
  89. <text>{{item.maintainStandard}}</text>
  90. </view>
  91. <view class="cell ">
  92. <text class="font-grey">选择的备件:</text>
  93. <view v-for="items in item.maintainSpare">
  94. <Cell :title="items.spareName +'/'+ items.model" :more="'x'+ items.mun + items.unit">
  95. </Cell>
  96. </view>
  97. </view>
  98. <view class="btn-status">
  99. <view class="">
  100. 照片
  101. </view>
  102. <view>
  103. <text class="btn btn-warning">
  104. 报修
  105. </text>
  106. <text class="btn btn-success">
  107. 选择备品备件
  108. </text>
  109. <text class="btn btn-primary" @click="">
  110. 保养完成
  111. </text>
  112. </view>
  113. </view>
  114. </view>
  115. </uni-collapse-item>
  116. </uni-collapse>
  117. </template>
  118. </view>
  119. </template>
  120. <script>
  121. import {
  122. get
  123. } from "@/utils/api.js"
  124. import Cell from '@/components/Cell.vue'
  125. import CellTip from '@/components/CellTip.vue'
  126. import OrderDetail from '../components/OrderDetail.vue'
  127. export default {
  128. components: {
  129. Cell,
  130. CellTip,
  131. OrderDetail
  132. },
  133. data() {
  134. return {
  135. worksheetInfo: null,
  136. detailsIng: [],
  137. detailsEd: []
  138. }
  139. },
  140. onLoad(options) {
  141. this.pageId = options.id;
  142. this.getInfo();
  143. },
  144. methods: {
  145. getInfo(id) {
  146. get(this.apiUrl + "/maintain/worksheet/info", {
  147. id: this.pageId
  148. }).then(res => {
  149. console.log(res)
  150. let worksheetInfo = res.data;
  151. this.worksheetInfo = worksheetInfo;
  152. let details = worksheetInfo.details;
  153. //未处理
  154. this.detailsIng = details.filter(el => {
  155. return el.status.id == 0
  156. })
  157. this.detailsEd = details.filter(el => {
  158. return el.status.id == 1
  159. })
  160. })
  161. },
  162. }
  163. }
  164. </script>
  165. <style lang="scss" scoped>
  166. .content-status {
  167. padding: 20rpx 0 40rpx;
  168. background-color: $page-bg;
  169. line-height: 1.5;
  170. font-size: $uni-font-size-base;
  171. color: $uni-text-color;
  172. .cell-box {
  173. .tip {
  174. position: relative;
  175. margin-bottom: 20rpx;
  176. }
  177. .tip text {
  178. position: absolute;
  179. right: 0;
  180. color: $uni-text-color-grey;
  181. }
  182. margin-bottom: 20rpx;
  183. }
  184. .cell {
  185. padding: 10rpx 30rpx;
  186. }
  187. .status-info {
  188. padding: 10rpx 30rpx;
  189. position: relative;
  190. border-top: 1px solid #D8D8D8;
  191. }
  192. .title {
  193. margin-bottom: 20rpx;
  194. font-weight: 700;
  195. text-indent: 0;
  196. }
  197. .font-grey {
  198. color: $uni-text-color-grey;
  199. }
  200. }
  201. .btn-status {
  202. padding: 30rpx 30rpx 20rpx;
  203. display: flex;
  204. justify-content: space-between;
  205. font-size: $uni-font-size-base;
  206. }
  207. </style>