steel_outbound.vue 3.2 KB

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