transportationDispatch.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //采购化工材料运输派单
  2. <template>
  3. <div class="homeworkPath">
  4. <div class="top">
  5. <el-input
  6. placeholder="请输入内容"
  7. class="input"
  8. v-model="input"
  9. clearable
  10. >
  11. </el-input>
  12. <el-button type="primary" class="btn" @click="onclick">
  13. <i class="el-icon-search"></i>查询1
  14. </el-button>
  15. </div>
  16. <el-tabs v-model="activeName">
  17. <!-- 未下发 -->
  18. <el-tab-pane label="已接收" name="first">
  19. <dilTable v-bind.sync="option1" ref="table"> </dilTable>
  20. </el-tab-pane>
  21. <!-- 已下发 -->
  22. <el-tab-pane label="已拒绝" name="second">
  23. <dilTable v-bind.sync="option2"> </dilTable>
  24. </el-tab-pane>
  25. </el-tabs>
  26. </div>
  27. </template>
  28. <script>
  29. import { getCookie } from "@/utils/util.js";
  30. export default {
  31. name: "inplantTMS",
  32. data() {
  33. return {
  34. input: "",
  35. Time: "",
  36. activeName: "first",
  37. option1: {
  38. // 表格请求数据的地址
  39. requestUrl:"",
  40. },
  41. option2: {
  42. // 表格请求数据的地址
  43. requestUrl:"",
  44. },
  45. };
  46. },
  47. created() {
  48. //判断是否是承运商
  49. if (getCookie("orgCode") == "chengyunshang") {
  50. this.option1.requestUrl =
  51. "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=2&orderStatus=111&carrierSSOId=" +
  52. getCookie("userId");
  53. this.option2.requestUrl =
  54. "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=6&carrierSSOId=" +
  55. getCookie("userId");
  56. } else {
  57. this.option1.requestUrl =
  58. "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=2&orderStatus=111&carrierSSOId=" +
  59. null;
  60. this.option2.requestUrl =
  61. "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=6&carrierSSOId=" +
  62. null;
  63. }
  64. },
  65. methods: {
  66. onclick() {
  67. if (this.activeName == "first") {
  68. this.option1.requestUrl =
  69. "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=111&con=" +
  70. this.input;
  71. } else {
  72. this.option2.requestUrl =
  73. "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=2&orderStatus=6&con=" +
  74. this.input;
  75. }
  76. },
  77. },
  78. };
  79. </script>
  80. <style lang='scss'>
  81. .homeworkPath {
  82. .top {
  83. padding: 40px;
  84. .input {
  85. width: 250px;
  86. margin-right: 10px;
  87. }
  88. }
  89. }
  90. </style>