_location.blade.php 8.1 KB

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