steel_inboundStatistics.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //入库
  2. <template>
  3. <div class="steel_inbound">
  4. <div class="sache">
  5. <!-- <el-input
  6. placeholder="请输入内容"
  7. v-model="inputText"
  8. clearable>
  9. </el-input>
  10. -->
  11. <span>入库时间:</span>
  12. <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
  13. </el-date-picker>
  14. <span>至</span>
  15. <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
  16. </el-date-picker>
  17. <el-button type="primary" class="btn" @click="onclick">
  18. <i class="el-icon-search"></i>查询
  19. </el-button>
  20. </div>
  21. <div class="table">
  22. <dilTable v-bind.sync="options" >
  23. <!-- <el-table-column fixed="right" label="操作" width="150">
  24. <template slot-scope="scope">
  25. <el-button type="text" size="mini" @click="inboundDetails(scope)">
  26. 详情
  27. </el-button>
  28. </template>
  29. </el-table-column> -->
  30. </dilTable>
  31. </div>
  32. </div>
  33. </template>
  34. <script>
  35. import { sjTime } from "@/utils/sharedJsFile";
  36. import { getCookie } from '@/utils/util.js';
  37. export default {
  38. data(){
  39. return{
  40. inputText:"",
  41. startTime: null,
  42. endTime: null,
  43. options:{
  44. // first请求数据的地址
  45. requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3,
  46. // selectionType: "select",
  47. // mapList: [],
  48. },
  49. }
  50. },
  51. methods:{
  52. // inboundDetails(scope){
  53. // this.$router.push("/inboundDetails/" + scope.row.inboundId)
  54. // },
  55. onclick(){
  56. let startTime = null;
  57. let endTime = null;
  58. if (this.startTime) {
  59. startTime = sjTime(this.startTime);
  60. }
  61. if (this.endTime) {
  62. endTime = sjTime(this.endTime);
  63. }
  64. if (startTime && endTime) {
  65. if (startTime < endTime) {
  66. if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
  67. this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
  68. }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
  69. this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
  70. }else{
  71. this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=371&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
  72. }
  73. } else {
  74. this.startTime = null;
  75. this.endTime = null;
  76. this.$message.warning("开始时间要比结束时间早");
  77. }
  78. } else {
  79. this.getRequestUrl()
  80. }
  81. },
  82. selectionChange(selection) {
  83. this.options.mapList = selection;
  84. },
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scode>
  89. .steel_inbound{
  90. .sache{
  91. height: 5rem;
  92. display: flex;
  93. align-items: center;
  94. padding-left: 1.875rem;
  95. }
  96. }
  97. </style>