truckEnfactoryFuResult.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <!-- 辅料进厂作业页面 -->
  3. <div class="homeworkPath">
  4. <div class="top">
  5. <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
  6.       <el-button type="primary" class="btn" @click="onclick">
  7.         <i class="el-icon-search"></i>查询
  8.       </el-button>
  9. </div>
  10. <dilTable v-bind.sync="option">
  11. </dilTable>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: "homeworkPath",
  17. data() {
  18. return {
  19. restaurants: [],
  20. input: "",
  21. option: {
  22. // 表格请求数据的地址
  23. requestUrl: "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=5",
  24. },
  25. };
  26. },
  27. methods: {
  28. querySearch(queryString, cb) {
  29. var restaurants = this.restaurants;
  30. var results = queryString
  31. ? restaurants.filter(this.createFilter(queryString))
  32. : restaurants;
  33. cb(results);
  34. },
  35. createFilter(queryString) {
  36. return (restaurant) => {
  37. return (
  38. restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
  39. 0
  40. );
  41. };
  42. },
  43. onclick() {
  44. this.option.requestUrl = "/api/v1/tms/getAllEnFactoryResult?apiId=143&orderType=5&con=" + this.input;
  45. },
  46. updateClick(resultId) {
  47. this.$router.push("/tmsTruck/truckLoadResultEdit/" + resultId);
  48. },
  49. //新增
  50. insertClick() {
  51. this.$router.push("/tmsTruck/truckLoadResultAdd/");
  52. },
  53. // deleteclick(scope) {
  54. // let pathId = scope;
  55. // this.$axios
  56. // .post("/api/v1/tms/operationPath/operationPathDelete?pathId=" + pathId)
  57. // .then((res) => {
  58. // this.$message({
  59. // message: "删除成功",
  60. // type: "success",
  61. // });
  62. // this.$router.go(0);
  63. // });
  64. // },
  65. deleteClick(resultId) {
  66. this.$confirm("是否删除", "提示", {
  67. confirmButtonText: "确定",
  68. cancelButtonText: "取消",
  69. type: "warning",
  70. center: true,
  71. })
  72. .then(() => {
  73. this.$message({
  74. type: "success",
  75. message: "删除成功!",
  76. });
  77. this.$axios
  78. .post(
  79. "/api/v1/tms/deleteLoadResult/" + resultId
  80. )
  81. .then(() => {
  82. this.$router.go(0);
  83. });
  84. })
  85. .catch(() => {
  86. this.$message({
  87. type: "info",
  88. message: "取消删除!",
  89. });
  90. });
  91. },
  92. },
  93. };
  94. </script>
  95. <style lang='scss' scoped>
  96. .homeworkPath {
  97. .top {
  98. padding: 1.25rem 1.875rem;
  99. }
  100. }
  101. </style>