工单小程序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.

184 lines
3.7 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 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. this.queryTemplateById()
  101. },
  102. onShow() {
  103. if(args.id){
  104. this.queryTemplateById()
  105. }
  106. },
  107. computed : {
  108. ...mapState(['workDetail']),
  109. },
  110. methods: {
  111. // 根据id获取工单详情
  112. queryTemplateById(){
  113. this.$api('queryTemplateById', {
  114. templateId : this.id
  115. }, res =>{
  116. if(res.code == 200){
  117. this.TemplateById = res.result
  118. }
  119. })
  120. },
  121. clickStep(item, index){
  122. let urls = [
  123. `/pages_order/order/ProcessCardOne?id=${this.id}&index=${index}&name=${item.name}`,
  124. `/pages_order/order/ProcessCardOne?id=${this.id}&index=${index}&name=${item.name}`,
  125. `/pages_order/order/ProcessCardOne?id=${this.id}&index=${index}&name=${item.name}`,
  126. `/pages_order/order/ProcessCardOne?id=${this.id}&index=${index}&name=${item.name}`,
  127. ]
  128. this.$utils.navigateTo(urls[index])
  129. }
  130. }
  131. }
  132. </script>
  133. <style scoped lang="scss">
  134. .page {
  135. background-color: #fff;
  136. height: 100vh;
  137. font-size: 28rpx;
  138. .Box{
  139. margin-top: 40rpx;
  140. .work-box {
  141. padding: 0rpx 30rpx;
  142. margin: 20rpx 0rpx;
  143. display: flex;
  144. .works {
  145. width: 150rpx;
  146. flex-shrink: 0;
  147. }
  148. .index {
  149. margin-top: 3rpx;
  150. }
  151. }
  152. }
  153. .working-procedure {
  154. text-align: center;
  155. margin-top: 150rpx;
  156. .working {
  157. margin: 25rpx 0rpx;
  158. color: rgb(83, 125, 180);
  159. }
  160. }
  161. .modify{
  162. text-align: center;
  163. margin-top: 150rpx;
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. .modi{
  168. padding: 20rpx 60rpx;
  169. background-color:rgb(2 ,167, 240) ;
  170. border-radius: 15rpx;
  171. color: #fff;
  172. }
  173. }
  174. }
  175. </style>