説明なし

workOrderDetail.vue 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="wrapper">
  3. <view class="detailContent">
  4. <view class="contentTable">
  5. <text class="contentTitle">工单编号:</text>
  6. <text class="contentText">{{ detailContentData.F_WorkOrderId }}</text>
  7. </view>
  8. <view class="contentTable">
  9. <text class="contentTitle">标题:</text>
  10. <text class="contentText">{{ detailContentData.F_ComTitle }}</text>
  11. </view>
  12. <view class="contentTable">
  13. <text class="contentTitle">来电内容:</text>
  14. <text class="contentText">{{ detailContentData.F_ComContent }}</text>
  15. </view>
  16. <view class="contentTable">
  17. <text class="contentTitle">工单内容:</text>
  18. <text class="contentText">{{ detailContentData.F_Content == null ? detailContentData.F_ComContent : detailContentData.F_Content}}</text>
  19. </view>
  20. <view class="contentTable">
  21. <text class="contentTitle">来电人:</text>
  22. <text class="contentText">{{ detailContentData.F_CusName }}</text>
  23. </view>
  24. <view class="contentTable">
  25. <text class="contentTitle">来电号码:</text>
  26. <text class="contentText">{{ detailContentData.F_CusPhone }}</text>
  27. </view>
  28. <view class="contentTable">
  29. <text class="contentTitle">来源:</text>
  30. <text class="contentText">{{ detailContentData.SourceName }}</text>
  31. </view>
  32. </view>
  33. <yiLine>
  34. <view></view>
  35. </yiLine>
  36. <view class="operationButton">
  37. <view>
  38. <text class="operationButtonTitle">操作</text>
  39. <view class="buttons">
  40. <button class="mini-btn" type="default" size="mini" v-for="item in workOrderButton" @click="callBtnMethods(item.eventName)" :key="item.id">{{ item.text }}</button>
  41. <!-- <button class="mini-btn" type="default" size="mini" @click="editBtn">查看</button>
  42. <button class="mini-btn" type="default" size="mini" @click="editBtn">编辑</button> -->
  43. <!-- <button class="mini-btn" type="default" size="mini" @click="transferBtn">转派</button> -->
  44. </view>
  45. </view>
  46. </view>
  47. <yiLine>
  48. <view></view>
  49. </yiLine>
  50. <view class="handleProcess">
  51. <view>
  52. <text class="handleProcessTitle">办理过程</text>
  53. <view class="handleProcessContent" v-for="item in handleProcessListData" :key=item.F_Id>
  54. <view class="handleProcessContentTime">
  55. <text>{{ item.F_CreateTime }}</text>
  56. </view>
  57. <view class="handleProcessContentText">
  58. <text>{{ item.F_Message }}</text>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import yiLine from "../../components/yi-line/yi-line.vue"
  67. const allButton = {
  68. 1: {
  69. id: 1,
  70. text: "查看",
  71. eventName: "viewBtn",
  72. },
  73. 2: {
  74. id: 2,
  75. text: "编辑",
  76. eventName: "editBtn",
  77. }
  78. }
  79. export default {
  80. components: {
  81. yiLine,
  82. },
  83. data() {
  84. return {
  85. wid: "", // 工单id
  86. detailContentData: {}, // 详情内容
  87. handleProcessListData: [], // 办理过程
  88. workOrderButton: [], // 工单按钮权限
  89. }
  90. },
  91. onLoad(option) {
  92. this.wid = option.wid;
  93. // 获取详情
  94. this.getDetail("0");
  95. // 获取办理过程
  96. this.getDetail("9");
  97. },
  98. methods: {
  99. getDetail(type) {
  100. let params = {
  101. type: type,
  102. workorderid: this.wid,
  103. token: uni.getStorageSync("token"),
  104. }
  105. this.$http.get("/WorkOrder/GetWorkOrderNew", params).then((response) => {
  106. if (response.state.toLowerCase() === "success") {
  107. let data = response.data;
  108. if (type === "0") {
  109. this.detailContentData = data.data[0];
  110. let btnData = data.btndata;
  111. if (btnData.length > 0) {
  112. btnData.forEach((element, index) => {
  113. let btn = allButton[element.key];
  114. if (btn != undefined) {
  115. this.workOrderButton.push(btn);
  116. }
  117. });
  118. }
  119. } else if (type === "9") {
  120. this.handleProcessListData = data;
  121. }
  122. }
  123. }).catch((e) => {
  124. console.log(e);
  125. })
  126. },
  127. callBtnMethods(methodName) {
  128. this[methodName]();
  129. },
  130. viewBtn() {
  131. uni.navigateTo({
  132. url: "/pages/viewWorkOrder/viewWorkOrder?wid=" + this.wid,
  133. })
  134. },
  135. editBtn() {
  136. uni.navigateTo({
  137. url: "/pages/editWorkOrder/editWorkOrder?wid=" + this.wid,
  138. })
  139. },
  140. transferBtn() {
  141. uni.navigateTo({
  142. url: "/pages/transferWorkOrder/transferWorkOrder?wid=" + this.wid,
  143. })
  144. },
  145. },
  146. }
  147. </script>
  148. <style lang="scss">
  149. .wrapper {
  150. padding: 10px 10px 0 10px;
  151. .detailContent {
  152. margin: 0 0 15px 0;
  153. .contentTable {
  154. margin: 0 0 5px 0;
  155. .contentTitle {
  156. font-weight: 700;
  157. font-size: 14px;
  158. }
  159. .contentText {
  160. color: #525252;
  161. font-size: 14px;
  162. }
  163. }
  164. }
  165. .operationButton {
  166. margin: 15px 0;
  167. .operationButtonTitle {
  168. font-weight: 700;
  169. }
  170. .buttons {
  171. margin: 10px 0 0 0;
  172. .mini-btn {
  173. margin-right: 3px;
  174. color: #fff;
  175. background: #1e90ff;
  176. }
  177. }
  178. }
  179. .handleProcess {
  180. margin: 15px 0;
  181. .handleProcessTitle {
  182. font-weight: 700;
  183. }
  184. .handleProcessContent {
  185. margin: 8px 0 0 0;
  186. .handleProcessContentTime text {
  187. font-size: 14px;
  188. color: #73d13d;
  189. }
  190. .handleProcessContentText text {
  191. font-size: 14px;
  192. color: #525252;
  193. }
  194. }
  195. }
  196. }
  197. </style>