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

132 lines
2.3 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="Urgent-Work-List"
  3. :style="{margin}"
  4. @click="$emit('click')">
  5. <view class="Work-List">
  6. <view class="label">
  7. 任务号
  8. </view>
  9. <view class="text">
  10. {{ obj.taskNo }}
  11. </view>
  12. </view>
  13. <view class="Work-List">
  14. <view class="label">
  15. 担当信息
  16. </view>
  17. <view class="text">
  18. {{ obj.responsibler }}
  19. </view>
  20. </view>
  21. <view class="Work-List">
  22. <view class="label">
  23. 机型信息
  24. </view>
  25. <view class="text">
  26. {{ obj.model }}
  27. </view>
  28. </view>
  29. <view class="Work-List">
  30. <view class="label">
  31. 数量
  32. </view>
  33. <view class="text">
  34. {{ obj.number }}
  35. </view>
  36. </view>
  37. <view class="Work-List">
  38. <view class="label">
  39. 工单状态
  40. </view>
  41. <view class="text">
  42. {{ obj.statusId_dictText }}
  43. </view>
  44. </view>
  45. <view class="Work-List"
  46. v-if="isShowCollect">
  47. <view class="modi"
  48. v-if="obj.collectonFlag"
  49. @click.stop="addCollection">
  50. 收藏
  51. </view>
  52. <view class="modi a"
  53. v-else
  54. @click.stop="addCollection">
  55. 取消收藏
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. name: "WorkOrderitem",
  63. props : {
  64. obj : {},
  65. margin : {
  66. default : '30rpx 0'
  67. },
  68. isShowCollect : {
  69. default : false,
  70. }
  71. },
  72. data() {
  73. return {
  74. };
  75. },
  76. methods : {
  77. //收藏信息-添加收藏
  78. addCollection(){
  79. this.$api('addCollection', {
  80. templateId : this.obj.id
  81. }, res => {
  82. this.$emit('getData')
  83. if(res.code == 200){
  84. uni.showToast({
  85. title: this.obj.collectonFlag ? '收藏成功' : '取消成功',
  86. icon: 'none'
  87. })
  88. this.obj.collectonFlag = !this.obj.collectonFlag
  89. }
  90. })
  91. },
  92. }
  93. }
  94. </script>
  95. <style scoped lang="scss">
  96. .Urgent-Work-List{
  97. box-shadow: 0 0 10rpx 10rpx #00000009;
  98. border-radius: 25rpx;
  99. padding: 15rpx;
  100. background-color: #fff;
  101. font-size: 28rpx;
  102. .Work-List{
  103. display: flex;
  104. padding: 20rpx 0rpx;
  105. .label{
  106. width: 150rpx;
  107. flex-shrink: 0;
  108. }
  109. .modi{
  110. padding: 15rpx 30rpx;
  111. border-radius: 15rpx;
  112. background-color: $uni-color;
  113. color: #fff;
  114. font-size: 22rpx;
  115. margin-left: auto;
  116. }
  117. .a{
  118. background-color: #fff;
  119. border: 1rpx solid $uni-color;
  120. color: $uni-color;
  121. }
  122. }
  123. }
  124. </style>