_location.blade.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <div class="modal fade" id="locationModal" v-if="currentEqChildIndex!==null" style="z-index: 1044" tabindex="1" role="dialog" aria-hidden="true">
  2. <div class="modal-dialog modal-lg modal-dialog-centered" role="document" style="z-index: 1045">
  3. <div class="modal-content">
  4. <div class="modal-header">
  5. <h1 class="offset-5" v-if="!batchSign">@{{ current.code+'-'+(currentEqChildIndex+1) }}</h1>
  6. <button type="button" class="close" data-dismiss="modal">&times;</button>
  7. </div>
  8. <div class="modal-body p-0">
  9. <div class="text-center h1" v-if="isLoadLocation">
  10. <i class="fa fa-spinner fa-pulse"></i>
  11. </div>
  12. <div class="w-100" v-else>
  13. <table class="table table-bordered w-100 h-100 m-0"
  14. v-if="!batchSign && (current.children && current.children[currentEqChildIndex] && current.children[currentEqChildIndex].row>0 && current.children[currentEqChildIndex].column>0)">
  15. <tr v-for="row in current.children[currentEqChildIndex].row">
  16. <td v-for="column in current.children[currentEqChildIndex].column" v-if="locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)]"
  17. class="p-0 text-center position-relative">
  18. <div style="min-height: 120px">
  19. <div class="w-100 h-100 text-secondary font-weight-bold"
  20. :style="locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code|childStyle">
  21. @{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code }}</div>
  22. <div style="position: absolute;bottom: 0" class="w-100 row">
  23. <div class="col-5 offset-1">
  24. <h6 class="text-muted">在库数量:</h6><b>@{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code | qty }}</b>
  25. </div>
  26. <div class="col-5">
  27. <h6 class="text-muted">待动数量:</h6><b>@{{ locations[(row-1)*current.children[currentEqChildIndex].column+(column-1)].code | qtyOver }}</b>
  28. </div>
  29. </div>
  30. </div>
  31. </td>
  32. </tr>
  33. </table>
  34. <div class="w-100 mt-3" v-else>
  35. <div class="row">
  36. <div class="input-group m-3 col-5">
  37. <input type="number" step="1" class="form-control" placeholder="构建行数" v-model="buildPool.row">
  38. <div class="input-group-append">
  39. <span class="input-group-text">行</span>
  40. </div>
  41. </div>
  42. <div class="col-1 mt-4 h5 font-weight-bold">×</div>
  43. <div class="input-group m-3 col-5">
  44. <input type="number" step="1" class="form-control" placeholder="构建列数" v-model="buildPool.column">
  45. <div class="input-group-append">
  46. <span class="input-group-text">列</span>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="row mt-5">
  51. <label class="offset-1 col-4 text-right" for="usage">用途</label>
  52. <select class="col-5 form-control" id="usage" v-model="buildPool.usage">
  53. <option v-for="(msg,key) in locationAttr.usage" :value="key">@{{ key+'('+msg+')' }}</option>
  54. </select>
  55. </div>
  56. <div class="row mt-3">
  57. <label class="offset-1 col-4 text-right" for="handling">处理方式</label>
  58. <select class="col-5 form-control" id="handling" v-model="buildPool.handling">
  59. <option v-for="(msg,key) in locationAttr.handling" :value="key">@{{ key+'('+msg+')' }}</option>
  60. </select>
  61. </div>
  62. <div class="row mt-3">
  63. <label class="offset-1 col-4 text-right" for="attribute">属性</label>
  64. <select class="col-5 form-control" id="attribute" v-model="buildPool.attribute">
  65. <option v-for="(msg,key) in locationAttr.attribute" :value="key">@{{ key+'('+msg+')' }}</option>
  66. </select>
  67. </div>
  68. <div class="row mt-3">
  69. <label class="offset-1 col-4 text-right" for="category">类别</label>
  70. <select class="col-5 form-control" id="category" v-model="buildPool.category">
  71. <option v-for="(msg,key) in locationAttr.category" :value="key">@{{ key+'('+msg+')' }}</option>
  72. </select>
  73. </div>
  74. <div class="row mt-3">
  75. <label class="offset-1 col-4 text-right" for="demand">需求</label>
  76. <select class="col-5 form-control" id="demand" v-model="buildPool.demand">
  77. <option v-for="(msg,key) in locationAttr.demand" :value="key">@{{ key+'('+msg+')' }}</option>
  78. </select>
  79. </div>
  80. <div class="row mt-3">
  81. <label class="offset-1 col-4 text-right" for="mixFlag">是否允许产品混放</label>
  82. <div class="col-5">
  83. <input class="switch" type="checkbox" id="mixFlag" v-model="buildPool.mixFlag" />
  84. </div>
  85. </div>
  86. <div class="row mt-3">
  87. <label class="offset-1 col-4 text-right" for="mixLotFlag">是否允许批次混放</label>
  88. <div class="col-5">
  89. <input class="switch" type="checkbox" id="mixLotFlag" v-model="buildPool.mixLotFlag" />
  90. </div>
  91. </div>
  92. <div class="row mt-3">
  93. <label class="offset-1 col-4 text-right" for="loseIdFlag">上架后是否释放跟踪号</label>
  94. <div class="col-5">
  95. <input class="switch" type="checkbox" id="loseIdFlag" v-model="buildPool.loseIdFlag" />
  96. </div>
  97. </div>
  98. <div class="row mt-3 mb-2">
  99. <label class="offset-1 col-4 text-right">纵数</label>
  100. <div class="col-5">
  101. <input min="1" type="number" step="1" max="26" class="form-control" v-model="buildPool.tandem" />
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="modal-footer">
  108. <button v-if="!batchSign && (current.children && current.children[currentEqChildIndex] && current.children[currentEqChildIndex].row>0 && current.children[currentEqChildIndex].column>0)" @click="removeLocationBind()"
  109. class="pull-right btn btn-danger">解除该设备库位绑定</button>
  110. <button v-else @click="locationBind()" class="pull-right btn btn-success">根据行列自动构建库位</button>
  111. </div>
  112. </div>
  113. </div>
  114. </div>