uncomplateTrainDetails.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <!-- 火运计费详单页面 -->
  3. <div class="purchaseOrder">
  4. <div class="top">
  5. <el-input
  6. placeholder="请输入内容"
  7. v-model="input"
  8. clearable>
  9. </el-input>
  10. <el-button type="primary" class="btn" @click="onclick">
  11. <i class="el-icon-search"></i>查询
  12. </el-button>
  13. <el-button type="primary" @click="btnclick">
  14. 生成火运费账单
  15. </el-button>
  16. </div>
  17. <dilTable v-bind.sync="option" @selection-change="selectionChange">
  18. </dilTable>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. name: "purchaseOrder",
  24. data() {
  25. return {
  26. input:"",
  27. option: {
  28. // 表格请求数据的地址
  29. requestUrl: "/api/v1/bms/getUncomplateTrainDetailsList?apiId=118",
  30. // 控制显示多选列
  31. selectionType: "select",
  32. mapList:[],
  33. },
  34. };
  35. },
  36. methods: {
  37. selectionChange(selection) {
  38. this.mapList=selection
  39. },
  40. onclick() {
  41. console.log(1);
  42. },
  43. btnclick() {
  44. this.$confirm("是否生成", "提示", {
  45. confirmButtonText: "确定",
  46. cancelButtonText: "取消",
  47. type: "warning",
  48. center: true,
  49. })
  50. .then(() => {
  51. this.$message({
  52. type: "success",
  53. message: "生成账单成功!",
  54. });
  55. this.axios.post("/api/v1/bms/addTrainStatement",this.mapList)
  56. .then(() => {
  57. this.$router.go(-1);
  58. });
  59. })
  60. .catch(() => {
  61. this.$message({
  62. type: "info",
  63. message: "取消生成!",
  64. });
  65. });
  66. // this.$router.push("/path/addHomeworkPath/");
  67. },
  68. },
  69. };
  70. </script>
  71. <style lang='scss' scoped>
  72. .purchaseOrder {
  73. .top {
  74. padding: 1.25rem 1.875rem;
  75. .el-input {
  76. width: 250px;
  77. }
  78. }
  79. }
  80. </style>