storageEnterprise.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <!-- 应急仓储企业 -->
  2. <template>
  3. <view class="formBox">
  4. <u-form :model="pageData" ref="uForm" label-align="right">
  5. <u-form-item label="原粮库房仓容(吨)" label-width="150px">
  6. <u-input readonly v-model="pageData.grainWarehouseCapacity" type="text" />
  7. </u-form-item>
  8. <u-form-item label="原粮油罐罐容(吨)" label-width="150px">
  9. <u-input readonly v-model="pageData.vegetableOilTankCapacity" type="text" />
  10. </u-form-item>
  11. <u-form-item label="成品粮库房容(吨)" label-width="150px">
  12. <u-input readonly v-model="pageData.finishedGrainWarehouseCapacity" type="text" />
  13. </u-form-item>
  14. <u-form-item label="成品粮油罐容(吨)" label-width="150px">
  15. <u-input readonly v-model="pageData.finishedOilTankCapacity" type="text" />
  16. </u-form-item>
  17. <u-form-item label="实际日运输量(吨/天)" label-width="150px">
  18. <u-input readonly v-model="pageData.dailyDeliveryCapacity" type="text" />
  19. </u-form-item>
  20. <u-form-item label="自有运输能力(吨)" label-width="150px">
  21. <u-input readonly v-model="pageData.ownTransportVehicles" type="text" />
  22. </u-form-item>
  23. <u-form-item label="自有运输车辆数(辆)" label-width="150px">
  24. <u-input readonly v-model="pageData.ownTransportVehicles" type="text" />
  25. </u-form-item>
  26. <u-form-item label="自有车辆日配送能力(吨)" label-width="150px">
  27. <u-input readonly v-model="pageData.ownVehiclesDailyDeliveryCapacity" type="text" />
  28. </u-form-item>
  29. </u-form>
  30. <u-scroll-list>
  31. <uni-table border stripe emptyText="暂无更多数据">
  32. <!-- 表头行 -->
  33. <uni-tr>
  34. <uni-th align="center" width="140">品种</uni-th>
  35. <uni-th align="center">小麦原粮</uni-th>
  36. <uni-th align="center">稻谷原粮</uni-th>
  37. <uni-th align="center">大豆原粮</uni-th>
  38. <uni-th align="center">玉米原粮</uni-th>
  39. <uni-th align="center">其他原粮</uni-th>
  40. <uni-th align="center">小麦粉成品粮</uni-th>
  41. <uni-th align="center">大米成品粮</uni-th>
  42. <uni-th align="center">食用油成品粮</uni-th>
  43. <uni-th align="center">其他成品粮</uni-th>
  44. </uni-tr>
  45. <uni-tr>
  46. <uni-td align="center">日库存(吨)</uni-td>
  47. <uni-td align="center">{{tableData.inventory.wheat}}</uni-td>
  48. <uni-td align="center">{{tableData.inventory.paddy}}</uni-td>
  49. <uni-td align="center">{{tableData.inventory.soybean}}</uni-td>
  50. <uni-td align="center">{{tableData.inventory.maize}}</uni-td>
  51. <uni-td align="center">{{tableData.inventory.otherGain}}</uni-td>
  52. <uni-td align="center">{{tableData.inventory.wheatFlour}}</uni-td>
  53. <uni-td align="center">{{tableData.inventory.riceProducts}}</uni-td>
  54. <uni-td align="center">{{tableData.inventory.edibleOil}}</uni-td>
  55. <uni-td align="center">{{tableData.inventory.otherGrainProducts}}</uni-td>
  56. </uni-tr>
  57. <uni-tr>
  58. <uni-td align="center">日出库量(吨)</uni-td>
  59. <uni-td align="center">{{tableData.delivery.wheat}}</uni-td>
  60. <uni-td align="center">{{tableData.delivery.paddy}}</uni-td>
  61. <uni-td align="center">{{tableData.delivery.soybean}}</uni-td>
  62. <uni-td align="center">{{tableData.delivery.maize}}</uni-td>
  63. <uni-td align="center">{{tableData.delivery.otherGain}}</uni-td>
  64. <uni-td align="center">{{tableData.delivery.wheatFlour}}</uni-td>
  65. <uni-td align="center">{{tableData.delivery.riceProducts}}</uni-td>
  66. <uni-td align="center">{{tableData.delivery.edibleOil}}</uni-td>
  67. <uni-td align="center">{{tableData.delivery.otherGrainProducts}}</uni-td>
  68. </uni-tr>
  69. <uni-tr>
  70. <uni-td align="center">日入库量(吨)</uni-td>
  71. <uni-td align="center">{{tableData.deposit.wheat}}</uni-td>
  72. <uni-td align="center">{{tableData.deposit.paddy}}</uni-td>
  73. <uni-td align="center">{{tableData.deposit.soybean}}</uni-td>
  74. <uni-td align="center">{{tableData.deposit.maize}}</uni-td>
  75. <uni-td align="center">{{tableData.deposit.otherGain}}</uni-td>
  76. <uni-td align="center">{{tableData.deposit.wheatFlour}}</uni-td>
  77. <uni-td align="center">{{tableData.deposit.riceProducts}}</uni-td>
  78. <uni-td align="center">{{tableData.deposit.edibleOil}}</uni-td>
  79. <uni-td align="center">{{tableData.deposit.otherGrainProducts}}</uni-td>
  80. </uni-tr>
  81. <uni-tr>
  82. <uni-td align="center">出库能力(吨)</uni-td>
  83. <uni-td align="center">{{tableData.capacity.wheat}}</uni-td>
  84. <uni-td align="center">{{tableData.capacity.paddy}}</uni-td>
  85. <uni-td align="center">{{tableData.capacity.soybean}}</uni-td>
  86. <uni-td align="center">{{tableData.capacity.maize}}</uni-td>
  87. <uni-td align="center">{{tableData.capacity.otherGain}}</uni-td>
  88. <uni-td align="center">{{tableData.capacity.wheatFlour}}</uni-td>
  89. <uni-td align="center">{{tableData.capacity.riceProducts}}</uni-td>
  90. <uni-td align="center">{{tableData.capacity.edibleOil}}</uni-td>
  91. <uni-td align="center">{{tableData.capacity.otherGrainProducts}}</uni-td>
  92. </uni-tr>
  93. </uni-table>
  94. </u-scroll-list>
  95. </view>
  96. </template>
  97. <script>
  98. export default {
  99. props: {
  100. pageData: {
  101. type: Object,
  102. required: true
  103. }
  104. },
  105. data() {
  106. return {
  107. tableData: {
  108. inventory: {}, // 日库存
  109. delivery: {}, // 日出库量
  110. deposit: {}, // 日入库量
  111. capacity: {} // 出库能力
  112. },
  113. varietyList: [{
  114. code: 1,
  115. key: "wheat",
  116. label: "小麦原粮",
  117. },
  118. {
  119. code: 2,
  120. key: "paddy",
  121. label: "稻谷原粮",
  122. },
  123. {
  124. code: 3,
  125. key: "soybean",
  126. label: "大豆原粮",
  127. },
  128. {
  129. code: 4,
  130. key: "maize",
  131. label: "玉米原粮",
  132. },
  133. {
  134. code: 5,
  135. key: "otherGain",
  136. label: "其他原粮",
  137. },
  138. {
  139. code: 6,
  140. key: "wheatFlour",
  141. label: "小麦粉成品粮",
  142. },
  143. {
  144. code: 7,
  145. key: "riceProducts",
  146. label: "大米成品粮",
  147. },
  148. {
  149. code: 8,
  150. key: "edibleOil",
  151. label: "食用油成品粮",
  152. },
  153. {
  154. code: 9,
  155. key: "otherGrainProducts",
  156. label: "其他成品粮",
  157. }
  158. ]
  159. }
  160. },
  161. methods: {
  162. returnkey(code) {
  163. let key = "";
  164. this.varietyList.map((item) => {
  165. if (item.code == code) {
  166. key = item.key;
  167. }
  168. });
  169. return key;
  170. },
  171. },
  172. watch: {
  173. pageData: {
  174. handler(newVal) {
  175. if (newVal.bizEsStorageEnterpriseGrain.length) {
  176. newVal.bizEsStorageEnterpriseGrain.map(item => {
  177. let key = this.returnkey(item.grainVariety);
  178. if (item.type == 1) { // 日库存
  179. this.tableData.inventory[key] = item.quantity;
  180. } else if (item.type == 2) { // 日出库量
  181. this.tableData.delivery[key] = item.quantity;
  182. } else if (item.type == 3) { // 日入库量
  183. this.tableData.deposit[key] = item.quantity;
  184. } else { // 出库能力
  185. this.tableData.capacity[key] = item.quantity;
  186. }
  187. })
  188. }
  189. },
  190. deep: true,
  191. immediate: true,
  192. }
  193. }
  194. }
  195. </script>
  196. <style scoped lang="scss">
  197. .formBox {
  198. .u-form {
  199. margin-bottom: 30px;
  200. overflow: hidden;
  201. .u-form-item {
  202. float: left;
  203. margin-right: 10px;
  204. width: calc(100% / 2 - 10px);
  205. }
  206. }
  207. .uni-table-scroll {
  208. margin: 20px 0;
  209. }
  210. }
  211. </style>