truckDriverReceiveFu.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. <el-tabs v-model="activeName" @tab-click="handleClick">
  11. <!-- 未接收 -->
  12. <el-tab-pane label="未接收" name="third">
  13. <dilTable v-bind.sync="option0">
  14. <el-table-column fixed="right" label="操作" width="50">
  15. <template slot-scope="scope">
  16. <el-button @click="closeOrder(scope.row.orderId)" type="text" size="small">
  17. 关闭
  18. </el-button>
  19. </template>
  20. </el-table-column>
  21. </dilTable>
  22. </el-tab-pane>
  23. <!-- 未下发 -->
  24. <el-tab-pane label="已接收" name="first">
  25. <dilTable v-bind.sync="option1" ref="table">
  26. </dilTable>
  27. </el-tab-pane>
  28. <!-- 已下发 -->
  29. <el-tab-pane label="已拒绝" name="second">
  30. <dilTable v-bind.sync="option2">
  31. </dilTable>
  32. </el-tab-pane>
  33. </el-tabs>
  34. </div>
  35. </template>
  36. <script>
  37. export default {
  38. name: "inplantTMS",
  39. data() {
  40. return {
  41. input: "",
  42. Time: "",
  43. activeName: "first",
  44. option0: {
  45. // 表格请求数据的地址
  46. requestUrl: "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4"
  47. },
  48. option1: {
  49. // 表格请求数据的地址
  50. requestUrl: "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5"
  51. },
  52. option2: {
  53. // 表格请求数据的地址
  54. requestUrl: "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=6"
  55. }
  56. };
  57. },
  58. methods: {
  59. closeOrder(orderId) {
  60. this.$confirm("是否关闭", "警告", {
  61. confirmButtonText: "确定",
  62. cancelButtonText: "取消",
  63. type: "warning",
  64. center: true,
  65. })
  66. .then(() => {
  67. this.$axios
  68. .post(
  69. "/api/v1/oms/closeOmstruckOrde?orderId="+orderId
  70. )
  71. .then((res) => {
  72. if(res.data.code == '200')
  73. // if(res.data.code)
  74. this.$router.go(0);
  75. });
  76. this.$message({
  77. type: "success",
  78. message: "下发成功!",
  79. });
  80. // console.log(this.arr[0].text_prop);
  81. })
  82. .catch(() => {
  83. this.$message({
  84. type: "info",
  85. message: "取消关闭!",
  86. });
  87. });
  88. },
  89. onclick() {
  90.  if(this.activeName == "first"){
  91.         this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&con=" + this.input;
  92.       }else if(this.activeName == "second"){
  93.         this.option2.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=6&con=" + this.input;
  94.       }else
  95. {
  96. this.option0.requestUrl="/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&con="+this.input;
  97. }
  98. },
  99. handleClick(tab, event) {
  100. console.log(tab, event);
  101. },
  102. },
  103. };
  104. </script>
  105. <style lang='scss' scoped>
  106. .homeworkPath {
  107. .top {
  108. padding: 1.25rem 1.875rem;
  109. }
  110. }
  111. </style>