handlereport.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <van-popup :show="show" @close="onClose" round closeable>
  3. <div class="height554rpx width622rpx allpd32rpx" style="margin-top: 70rpx">
  4. <div class="width100 height35px marginb16 mt32rpx">
  5. <div class="handlefont width20 float_left height35px l35pxheight">
  6. 处理人:
  7. </div>
  8. <div class="width80 float_left">
  9. <uni-easyinput
  10. :inputBorder="true"
  11. v-model="form.handleUserName"
  12. placeholder="请输入"
  13. ></uni-easyinput>
  14. </div>
  15. </div>
  16. <div class="width100 mb32rpx">
  17. <div class="handlefont width100 mb32rpx">处理说明</div>
  18. <div class="width100">
  19. <uni-easyinput
  20. v-model="form.handleResult"
  21. autoHeight
  22. type="textarea"
  23. placeholder="请输入"
  24. ></uni-easyinput>
  25. </div>
  26. </div>
  27. <div class="width100">
  28. <div class="button_row cancel_btn" @click="onClose()">取消</div>
  29. <div class="button_row ok_btn" @click="dialogInputConfirm()">确认</div>
  30. </div>
  31. </div>
  32. </van-popup>
  33. </template>
  34. <script>
  35. import vanPopup from "../../../wxcomponents/weapp/dist/popup/index";
  36. import vanField from "../../../wxcomponents/weapp/dist/field/index";
  37. import { editInterview } from "@/js_sdk/http.js";
  38. export default {
  39. name: "handlereport",
  40. data() {
  41. return {
  42. show: false,
  43. form: {
  44. name: "",
  45. message: "",
  46. },
  47. };
  48. },
  49. components: {
  50. vanPopup,
  51. vanField,
  52. },
  53. methods: {
  54. openDianlog(item) {
  55. this.form = { ...item };
  56. this.show = true;
  57. },
  58. onClose() {
  59. this.show = false;
  60. },
  61. getNowDate() {
  62. var date = new Date();
  63. var sign2 = ":";
  64. var year = date.getFullYear(); // 年
  65. var month = date.getMonth() + 1; // 月
  66. var day = date.getDate(); // 日
  67. var hour = date.getHours(); // 时
  68. var minutes = date.getMinutes(); // 分
  69. var seconds = date.getSeconds(); //秒
  70. var weekArr = [
  71. "星期一",
  72. "星期二",
  73. "星期三",
  74. "星期四",
  75. "星期五",
  76. "星期六",
  77. "星期天",
  78. ];
  79. var week = weekArr[date.getDay()];
  80. // 给一位数的数据前面加 “0”
  81. if (month >= 1 && month <= 9) {
  82. month = "0" + month;
  83. }
  84. if (day >= 0 && day <= 9) {
  85. day = "0" + day;
  86. }
  87. if (hour >= 0 && hour <= 9) {
  88. hour = "0" + hour;
  89. }
  90. if (minutes >= 0 && minutes <= 9) {
  91. minutes = "0" + minutes;
  92. }
  93. if (seconds >= 0 && seconds <= 9) {
  94. seconds = "0" + seconds;
  95. }
  96. return (
  97. year +
  98. "-" +
  99. month +
  100. "-" +
  101. day +
  102. " " +
  103. hour +
  104. sign2 +
  105. minutes +
  106. sign2 +
  107. seconds
  108. );
  109. },
  110. async dialogInputConfirm() {
  111. if (!this.form.handleUserName || this.form.handleUserName.length == 0) {
  112. this.$showToast("请填写处理人名称");
  113. return;
  114. }
  115. if (!this.form.handleResult || this.form.handleResult.length == 0) {
  116. this.$showToast("请填写处理说明");
  117. return;
  118. }
  119. this.form.handleTime = this.getNowDate();
  120. let data = await editInterview({ ...this.form });
  121. if (data.code == 200) {
  122. this.$showToast("登记完成");
  123. this.show = false;
  124. this.$emit("changeActive");
  125. }
  126. },
  127. },
  128. };
  129. </script>
  130. <style scoped>
  131. .handlefont {
  132. font-size: 28rpx;
  133. font-family: Segoe UI-Regular, Segoe UI;
  134. font-weight: 400;
  135. color: #777777;
  136. }
  137. .button_row {
  138. color: #ffffff;
  139. background: #1d18bc;
  140. width: 140rpx;
  141. height: 50rpx;
  142. border-radius: 8rpx 8rpx 8rpx 8rpx;
  143. opacity: 1;
  144. text-align: center;
  145. line-height: 50rpx;
  146. font-size: 24rpx;
  147. border: 2rpx solid #1d18bc;
  148. }
  149. .cancel_btn {
  150. position: absolute;
  151. top: 545rpx;
  152. left: 20rpx;
  153. }
  154. .ok_btn {
  155. position: absolute;
  156. right: 20rpx;
  157. top: 545rpx;
  158. }
  159. </style>