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

192 lines
3.8 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
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 class="modi a">
  85. 已收藏
  86. </view>
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. import { mapState } from 'vuex'
  92. export default {
  93. data() {
  94. return {
  95. id : 0,
  96. TemplateById : {
  97. workorderStepList : []
  98. },
  99. }
  100. },
  101. onLoad(args) {
  102. this.id = args.id
  103. },
  104. onShow() {
  105. if(this.id){
  106. this.queryTemplateById()
  107. }
  108. },
  109. computed : {
  110. ...mapState(['workDetail']),
  111. },
  112. methods: {
  113. // 根据id获取工单详情
  114. queryTemplateById(){
  115. this.$api('queryTemplateById', {
  116. templateId : this.id
  117. }, res =>{
  118. if(res.code == 200){
  119. this.TemplateById = res.result
  120. }
  121. })
  122. },
  123. clickStep(item, index){
  124. let urls = [
  125. `/pages_order/order/ProcessCardOne?id=${this.id}&index=${index}&name=${item.name}`,
  126. `/pages_order/order/ProcessCardTo?id=${this.id}&index=${index}&name=${item.name}`,
  127. `/pages_order/order/ProcessCardThree?id=${this.id}&index=${index}&name=${item.name}`,
  128. `/pages_order/order/ProcessCardFour?id=${this.id}&index=${index}&name=${item.name}`,
  129. ]
  130. this.$utils.navigateTo(urls[index])
  131. }
  132. }
  133. }
  134. </script>
  135. <style scoped lang="scss">
  136. .page {
  137. background-color: #fff;
  138. height: 100vh;
  139. font-size: 28rpx;
  140. .Box{
  141. margin-top: 40rpx;
  142. .work-box {
  143. padding: 0rpx 30rpx;
  144. margin: 20rpx 0rpx;
  145. display: flex;
  146. .works {
  147. width: 150rpx;
  148. flex-shrink: 0;
  149. }
  150. .index {
  151. margin-top: 3rpx;
  152. }
  153. }
  154. }
  155. .working-procedure {
  156. text-align: center;
  157. margin-top: 150rpx;
  158. .working {
  159. margin: 25rpx 0rpx;
  160. color: rgb(83, 125, 180);
  161. }
  162. }
  163. .modify{
  164. text-align: center;
  165. margin-top: 150rpx;
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. gap: 30rpx;
  170. .modi{
  171. padding: 20rpx 60rpx;
  172. border-radius: 15rpx;
  173. background-color: $uni-color;
  174. color: #fff;
  175. }
  176. .a{
  177. background-color: #fff;
  178. border: 1rpx solid $uni-color;
  179. color: $uni-color;
  180. }
  181. }
  182. }
  183. </style>