工单小程序2024-11-20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
3.7 KiB

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. <template>
  2. <!-- 工单详情 -->
  3. <view class="page">
  4. <navbar
  5. title="详情"
  6. leftClick
  7. @leftClick="$utils.navigateBack"
  8. />
  9. <view class="Box">
  10. <view class="work-box">
  11. <view class="works">
  12. 任务号
  13. </view>
  14. <view class="index">
  15. {{TemplateById.taskNo}}
  16. </view>
  17. </view>
  18. <view class="work-box">
  19. <view class="works">
  20. 担当信息
  21. </view>
  22. <view class="index">
  23. {{TemplateById.responsibler}}
  24. </view>
  25. </view>
  26. <view class="work-box">
  27. <view class="works">
  28. 机型信息
  29. </view>
  30. <view class="inde">
  31. {{TemplateById.model}}
  32. </view>
  33. </view>
  34. <view class="work-box">
  35. <view class="works">
  36. 数量
  37. </view>
  38. <view class="index">
  39. {{TemplateById.number}}
  40. </view>
  41. </view>
  42. <view class="work-box">
  43. <view class="works">
  44. 状态
  45. </view>
  46. <view class="index">
  47. {{TemplateById.statusDescribe}}
  48. </view>
  49. </view>
  50. <view class="work-box">
  51. <view class="works">
  52. 备注
  53. </view>
  54. <view class="index">
  55. {{TemplateById.remark}}
  56. </view>
  57. </view>
  58. </view>
  59. <view class="working-procedure">
  60. <view class="working"
  61. v-for="(item, index) in TemplateById.workorderStepList"
  62. :key="index"
  63. @click="clickStep(item, index)" >
  64. {{ item.name }}
  65. </view>
  66. <!-- <view class="working"
  67. @click="$utils.navigateTo('/pages_order/order/ProcessCardTo?id=' + id)">
  68. 中试压缩机试作工序卡2
  69. </view>
  70. <view class="working"
  71. @click="$utils.navigateTo('/pages_order/order/ProcessCardThree?id=' + id)">
  72. 中试压缩机试作工序卡3
  73. </view>
  74. <view class="working"
  75. @click="$utils.navigateTo('/pages_order/order/ProcessCardFour?id=' + id)">
  76. 中试压缩机试作工序卡4(总成)
  77. </view> -->
  78. </view>
  79. <view class="modify">
  80. <view class="modi"
  81. @click="$utils.navigateTo('/pages_order/order/ModifyWorkOrder?id=' + id)">
  82. 修改
  83. </view>
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. import { mapState } from 'vuex'
  89. export default {
  90. data() {
  91. return {
  92. id : 0,
  93. TemplateById : {
  94. workorderStepList : []
  95. },
  96. }
  97. },
  98. onLoad(args) {
  99. this.id = args.id
  100. },
  101. onShow() {
  102. if(this.id){
  103. this.queryTemplateById()
  104. }
  105. },
  106. computed : {
  107. ...mapState(['workDetail']),
  108. },
  109. methods: {
  110. // 根据id获取工单详情
  111. queryTemplateById(){
  112. this.$api('queryTemplateById', {
  113. templateId : this.id
  114. }, res =>{
  115. if(res.code == 200){
  116. this.TemplateById = res.result
  117. }
  118. })
  119. },
  120. clickStep(item, index){
  121. let urls = [
  122. `/pages_order/order/ProcessCardOne?id=${this.id}&index=${index}&name=${item.name}`,
  123. `/pages_order/order/ProcessCardTo?id=${this.id}&index=${index}&name=${item.name}`,
  124. `/pages_order/order/ProcessCardThree?id=${this.id}&index=${index}&name=${item.name}`,
  125. `/pages_order/order/ProcessCardFour?id=${this.id}&index=${index}&name=${item.name}`,
  126. ]
  127. this.$utils.navigateTo(urls[index])
  128. }
  129. }
  130. }
  131. </script>
  132. <style scoped lang="scss">
  133. .page {
  134. background-color: #fff;
  135. height: 100vh;
  136. font-size: 28rpx;
  137. .Box{
  138. margin-top: 40rpx;
  139. .work-box {
  140. padding: 0rpx 30rpx;
  141. margin: 20rpx 0rpx;
  142. display: flex;
  143. .works {
  144. width: 150rpx;
  145. flex-shrink: 0;
  146. }
  147. .index {
  148. margin-top: 3rpx;
  149. }
  150. }
  151. }
  152. .working-procedure {
  153. text-align: center;
  154. margin-top: 150rpx;
  155. .working {
  156. margin: 25rpx 0rpx;
  157. color: rgb(83, 125, 180);
  158. }
  159. }
  160. .modify{
  161. text-align: center;
  162. margin-top: 150rpx;
  163. display: flex;
  164. align-items: center;
  165. justify-content: center;
  166. .modi{
  167. padding: 20rpx 60rpx;
  168. background-color:rgb(2 ,167, 240) ;
  169. border-radius: 15rpx;
  170. color: #fff;
  171. }
  172. }
  173. }
  174. </style>