steel_real.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <!-- 实时库存 -->
  3. <div class="steel_real">
  4. <div class="sache">
  5. <el-input placeholder="请输入内容" v-model="inputText" clearable>
  6. </el-input>
  7. <el-select v-model="warehouseId" placeholder="一棒库" style="width: auto;">
  8. <el-option label="不选择仓库" value="0"></el-option>
  9. <el-option label="一棒库" value="1"></el-option>
  10. <el-option label="二棒库" value="2"></el-option>
  11. <el-option label="高线库" value="3"></el-option>
  12. <el-option label="配送库" value="4"></el-option>
  13. </el-select>
  14. <el-select v-model="time" placeholder="一个月" style="width: auto;">
  15. <el-option label="不选择月份" value="0"></el-option>
  16. <el-option label="一个月" value="1"></el-option>
  17. <el-option label="半个月" value="2"></el-option>
  18. <!-- <el-option label="" value="3"></el-option> -->
  19. </el-select>
  20. <el-button type="primary" class="btn" @click="onClick">
  21. <i class="el-icon-search"></i>查询
  22. </el-button>
  23. </div>
  24. <dilTable v-bind.sync="option" :height="500" @func="func" :rowClassName="rowClassName"
  25. style="height: 300px">
  26. </dilTable>
  27. <!-- <dilTable v-bind.sync="options" >
  28. </dilTable> -->
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. name:"steel_real",
  34. data(){
  35. return {
  36. warehouseId:"",
  37. time:'',
  38. rowIndex:null,
  39. mapList:[],
  40. inputText:"",
  41. option: {
  42. requestUrl: "/api/v1/wms/selectGridMaterialList?apiId=167&warehouseId="+"0"+"&time="+"0",
  43. },
  44. rowId:''
  45. };
  46. },
  47. mounted(){
  48. },
  49. created(){
  50. },
  51. methods:{
  52. rowClassName({row, rowIndex}) {
  53. if (row.status === 1) {
  54. return 'success-row';
  55. }
  56. return '';
  57. },
  58. func(res){
  59. // console.log(res)
  60. res.list.forEach(e => {
  61. console.log(e.status)
  62. if(e.status == 0){
  63. // 表示这个物资已经达到库龄预警
  64. }
  65. // console.log(this.mapList)
  66. });
  67. },
  68. demotionClick(gridId){
  69. this.$router.push("/steel_realDown/" + gridId);
  70. },
  71. onClick(){
  72. this.option.requestUrl= "/api/v1/wms/selectGridMaterialList?apiId=167&warehouseId="+this.warehouseId+"&time="+this.time+"&con="+this.inputText;
  73. console.log(this.inputText)
  74. }
  75. },
  76. };
  77. </script>
  78. <style lang="scss" scode>
  79. .tableHeight{
  80. height: 300px;
  81. }
  82. .steel_real{
  83. .sache{
  84. padding: 1.25rem 0.375rem;
  85. .el-input {
  86. width: 20%;
  87. margin-right: 1.25rem;
  88. }
  89. .el-select {
  90. width: 100%;
  91. .el-input__inner {
  92. width: 150px;
  93. }
  94. .el-input__suffix{
  95. padding-left: 100px;
  96. }
  97. }
  98. }
  99. }
  100. </style>