tareWeightResult.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //计皮
  2. <template>
  3. <!-- 零星物资计皮作业页面 -->
  4. <div class="homeworkPath">
  5. <div class="top">
  6. <span class="text">装车结束时间:</span>
  7. <el-date-picker
  8. v-model="startTime"
  9. type="datetime"
  10. placeholder="选择日期"
  11. style="width:200px"
  12. >
  13. </el-date-picker>
  14. <span class="text">至</span>
  15. <el-date-picker
  16. v-model="endTime"
  17. type="datetime"
  18. placeholder="选择日期"
  19. style="width:200px"
  20. >
  21. </el-date-picker>
  22. <el-input
  23. placeholder="请输入内容"
  24. v-model="input"
  25. clearable
  26. style="width:200px"
  27. >
  28. </el-input>
  29. <el-button type="primary" class="btn" @click="onclick">
  30. <i class="el-icon-search"></i>
  31. </el-button>
  32. </div>
  33. <div class="table"><dilTable v-bind.sync="option"> </dilTable></div>
  34. </div>
  35. </template>
  36. <script>
  37. import { getCookie } from "@/utils/util.js";
  38. import { sjTime } from "@/utils/sharedJsFile";
  39. export default {
  40. name: "homeworkPath",
  41. data() {
  42. return {
  43. input: "",
  44. option: {
  45. // 表格请求数据的地址
  46. requestUrl: ""
  47. }
  48. };
  49. },
  50. created() {
  51. if (
  52. getCookie("orgCode") == "dagangadmin" ||
  53. getCookie("orgCode") == "zidonghuabu"
  54. ) {
  55. this.option.requestUrl =
  56. "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11";
  57. } else {
  58. this.option.requestUrl =
  59. "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11&userId=" +
  60. getCookie("orgCode");
  61. }
  62. },
  63. methods: {
  64. onclick() {
  65. let orgCode = null;
  66. let startTime = null;
  67. let endTime = null;
  68. if (this.startTime && this.endTime) {
  69. startTime = sjTime(this.startTime);
  70. endTime = sjTime(this.endTime);
  71. }
  72. if (
  73. getCookie("orgCode") != "dagangadmin" &&
  74. getCookie("orgCode") != "zidonghuabu" &&
  75. getCookie("orgCode") != "wuliuchuyunzhongxin"
  76. ) {
  77. orgCode = getCookie("orgCode");
  78. }
  79. this.option.requestUrl =
  80. "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11&userId=" +
  81. orgCode +
  82. "&startTime=" +
  83. startTime +
  84. "&endTime=" +
  85. endTime +
  86. "&con=" +
  87. this.input +
  88. "&i=" +
  89. new Date();
  90. }
  91. }
  92. };
  93. </script>
  94. <style lang="scss" scoped>
  95. .homeworkPath {
  96. .top {
  97. margin-left: 20px;
  98. margin-top: 20px;
  99. }
  100. .table {
  101. margin-left: 20px;
  102. margin-top: 20px;
  103. }
  104. }
  105. </style>