addqueueFCancel.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // 排队取消
  2. <template>
  3. <div class="addqueueFCancel">
  4. <div class="top">
  5. <dil-form :formId="247" v-model="form" @change="onChange"></dil-form>
  6. </div>
  7. <div class="tab">
  8. <dilTable
  9. v-bind.sync="option"
  10. @selection-change="selectionChange"
  11. ></dilTable>
  12. </div>
  13. <div class="reason">
  14. <div class="re">
  15. <span class="text">取消原因:</span>
  16. <el-input
  17. type="textarea"
  18. :rows="4"
  19. placeholder="请输入内容"
  20. v-model="textarea"
  21. maxlength="250"
  22. minlength="1"
  23. resize="none"
  24. show-word-limit
  25. >
  26. </el-input>
  27. </div>
  28. </div>
  29. <div class="btn">
  30. <el-button @click="cancel">取消</el-button>
  31. <el-button type="primary" @click="onclick">确认</el-button>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. form: {},
  40. form1: {},
  41. option: {
  42. // 表格请求数据的地址
  43. requestUrl: "/api/v1/qms/getAllQueueMes?apiId=184",
  44. // 控制显示当选列
  45. selectionType: "select",
  46. },
  47. // 转移后的门岗id
  48. gatepostId: 0,
  49. // 排队实绩id
  50. resultIdList: [],
  51. //转移原因
  52. textarea: "",
  53. };
  54. },
  55. methods: {
  56. cancel(){
  57. this.$router.push({
  58. path: "/queueFCancel",
  59. });
  60. },
  61. onChange(val) {
  62. this.option.requestUrl =
  63. "/api/v1/qms/getAllQueueMes?apiId=184&gatepostId=" + val.gatepostId+"&i="+new Date();
  64. },
  65. selectionChange(row) {
  66. this.resultIdList = [];
  67. row.forEach((e) => {
  68. this.resultIdList.push(e.resultId);
  69. });
  70. },
  71. onclick() {
  72. var mapValue = {
  73. resultIdList: this.resultIdList,
  74. resultCancelReason: this.textarea,
  75. };
  76. console.log(mapValue);
  77. this.axios.post("/api/v1/qms/queueCancel", mapValue).then((res) => {
  78. if (res.data.code == "200") {
  79. this.cancel();
  80. this.$message({
  81. message: "取消排队成功!",
  82. type: "success",
  83. });
  84. }
  85. });
  86. },
  87. },
  88. };
  89. </script>
  90. <style lang="scss">
  91. .addqueueFCancel {
  92. .top {
  93. width: 100%;
  94. height: 80px;
  95. padding-left: 50px;
  96. padding-top: 20px;
  97. }
  98. .tab {
  99. width: 100%;
  100. max-height: 300px;
  101. }
  102. .reason {
  103. width: 100%;
  104. margin-top: 30px;
  105. margin-bottom: 30px;
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. .re {
  110. display: flex;
  111. width: 30%;
  112. .text {
  113. width: 100px;
  114. text-align: right;
  115. margin-right: 10px;
  116. }
  117. }
  118. }
  119. .btn {
  120. width: 100%;
  121. height: 80px;
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. }
  126. }
  127. </style>