steel_inbound.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. <el-button type="primary" class="btn" @click="onreserved">
  21. 预留
  22. </el-button>
  23. </div>
  24. <div class="table">
  25. <dilTable v-bind.sync="options" >
  26. <!-- <el-table-column fixed="right" label="操作" width="150">
  27. <template slot-scope="scope">
  28. <el-button type="text" size="mini" @click="inboundDetails(scope)">
  29. 详情
  30. </el-button>
  31. </template>
  32. </el-table-column> -->
  33. </dilTable>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. import { sjTime } from "@/utils/sharedJsFile";
  39. import { getCookie } from '@/utils/util.js';
  40. export default {
  41. data(){
  42. return{
  43. inputText:"",
  44. startTime: null,
  45. endTime: null,
  46. options:{
  47. // first请求数据的地址
  48. requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371",
  49. // selectionType: "select",
  50. // mapList: [],
  51. },
  52. }
  53. },
  54. methods:{
  55. // inboundDetails(scope){
  56. // this.$router.push("/inboundDetails/" + scope.row.inboundId)
  57. // },
  58. onclick(){
  59. let startTime = null;
  60. let endTime = null;
  61. if (this.startTime) {
  62. startTime = sjTime(this.startTime);
  63. }
  64. if (this.endTime) {
  65. endTime = sjTime(this.endTime);
  66. }
  67. if (startTime && endTime) {
  68. if (startTime < endTime) {
  69. if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
  70. this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
  71. }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
  72. this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
  73. }else{
  74. this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
  75. }
  76. } else {
  77. this.startTime = null;
  78. this.endTime = null;
  79. this.$message.warning("开始时间要比结束时间早");
  80. }
  81. } else {
  82. this.getRequestUrl()
  83. }
  84. },
  85. selectionChange(selection) {
  86. this.options.mapList = selection;
  87. },
  88. onreserved(){
  89. this.$router.push({
  90. path: "/addSteelInbound",
  91. });
  92. }
  93. }
  94. }
  95. </script>
  96. <style lang="scss" scode>
  97. .steel_inbound{
  98. .sache{
  99. height: 5rem;
  100. display: flex;
  101. align-items: center;
  102. padding-left: 1.875rem;
  103. }
  104. }
  105. </style>