tareWeightResult.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. endTime: null,
  44. startTime: null,
  45. input: "",
  46. option: {
  47. // 表格请求数据的地址
  48. requestUrl: ""
  49. }
  50. };
  51. },
  52. created() {
  53. if (
  54. getCookie("orgCode") == "dagangadmin" ||
  55. getCookie("orgCode") == "zidonghuabu"
  56. ) {
  57. this.option.requestUrl =
  58. "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11";
  59. } else {
  60. this.option.requestUrl =
  61. "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11&userId=" +
  62. getCookie("orgCode");
  63. }
  64. },
  65. methods: {
  66. onclick() {
  67. let orgCode = null;
  68. let startTime = null;
  69. let endTime = null;
  70. if (this.startTime && this.endTime) {
  71. startTime = sjTime(this.startTime);
  72. endTime = sjTime(this.endTime);
  73. }
  74. if (
  75. getCookie("orgCode") != "dagangadmin" &&
  76. getCookie("orgCode") != "zidonghuabu" &&
  77. getCookie("orgCode") != "wuliuchuyunzhongxin"
  78. ) {
  79. orgCode = getCookie("orgCode");
  80. }
  81. this.option.requestUrl =
  82. "/api/v1/tms/getAllJiMaoResult?apiId=358&orderType=11&userId=" +
  83. orgCode +
  84. "&startTime=" +
  85. startTime +
  86. "&endTime=" +
  87. endTime +
  88. "&con=" +
  89. this.input +
  90. "&i=" +
  91. new Date();
  92. }
  93. }
  94. };
  95. </script>
  96. <style lang="scss" scoped>
  97. .homeworkPath {
  98. .top {
  99. margin-left: 20px;
  100. margin-top: 20px;
  101. }
  102. .table {
  103. margin-left: 20px;
  104. margin-top: 20px;
  105. }
  106. }
  107. </style>