warehousingDtl.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="warehousingDtl">
  3. <commons-select-time v-model="req" @change="init"></commons-select-time>
  4. <view class="commons-title">
  5. <view class="">
  6. 汇总
  7. </view>
  8. </view>
  9. <view style="margin: 0 30rpx;font-size: 12rpx;">
  10. <uni-table border stripe emptyText="暂无更多数据">
  11. <!-- 表头行 -->
  12. <uni-tr>
  13. <uni-th width="90rpx" align="left"></uni-th>
  14. <uni-th width="150rpx" align="left">件</uni-th>
  15. <uni-th width="150rpx" align="left">米</uni-th>
  16. <uni-th width="150rpx" align="left">金额</uni-th>
  17. </uni-tr>
  18. <!-- 表格数据行 -->
  19. <uni-tr>
  20. <uni-td><view class="pa-bg-2">合计</view>1</uni-td>
  21. <uni-td><view class="pa-bg-2">{{selectFabricWDetailsData.total}}</view></uni-td>
  22. <uni-td><view class="pa-bg-2">{{selectFabricWDetailsData.amountQuantity}}</view></uni-td>
  23. <uni-td><view class="pa-bg-2">{{selectFabricWDetailsData.amountTotal}}</view></uni-td>
  24. </uni-tr>
  25. <uni-tr v-for="(i,index) in selectFabricWDetailsData.details" :key="index">
  26. <uni-td>{{i.houseName}}</uni-td>
  27. <uni-td>{{i.count}}</uni-td>
  28. <uni-td>{{i.changeNum}}</uni-td>
  29. <uni-td>{{i.amount}}</uni-td>
  30. </uni-tr>
  31. </uni-table>
  32. </view>
  33. <view class="" v-for="i in dataList" :key="i.type" v-if="i.type != 3">
  34. <view class="commons-title">
  35. <view class="">
  36. {{i.name}}
  37. </view>
  38. <view>
  39. <uni-data-checkbox
  40. v-model="i.houseType"
  41. @change="(e)=>getSelectFabricWTypeDetails(e.detail.data.value,i.type)"
  42. :localdata="warehouseList"
  43. />
  44. </view>
  45. </view>
  46. <view style="margin: 0 30rpx;font-size: 12rpx;">
  47. <uni-table border stripe emptyText="暂无更多数据">
  48. <!-- 表头行 -->
  49. <uni-tr>
  50. <uni-th width="90rpx" align="left"></uni-th>
  51. <uni-th width="150rpx" align="left">件</uni-th>
  52. <uni-th width="150rpx" align="left">米</uni-th>
  53. <uni-th width="150rpx" align="left">金额</uni-th>
  54. </uni-tr>
  55. <!-- 表格数据行 -->
  56. <uni-tr v-for="(j,jindex) in i.dtlList" :key="jindex">
  57. <uni-td>{{j.rurpose}}</uni-td>
  58. <uni-td>{{j.count}}</uni-td>
  59. <uni-td>{{j.changeNum}}</uni-td>
  60. <uni-td>{{j.amount}}</uni-td>
  61. </uni-tr>
  62. </uni-table>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import commonsSelectTime from '../../components/commons-select-time/index.vue'
  69. import {
  70. getInfo
  71. } from "@/util/api.js";
  72. export default {
  73. components: {
  74. commonsSelectTime
  75. },
  76. data() {
  77. return {
  78. warehouseList: [{
  79. text: "全部",
  80. value: '0'
  81. },
  82. {
  83. text: "一楼",
  84. value: '1'
  85. }, {
  86. text: "四楼",
  87. value: '2'
  88. }
  89. ],
  90. req: {
  91. type: 0,
  92. time: [],
  93. beginTime: null,
  94. endTime: null,
  95. },
  96. headerNavType: 1,
  97. selectFabricWData: {},
  98. fabricStatisticsData: {},
  99. selectFabricWDetailsData: {},
  100. dataList:[
  101. {name:"直喷",type:0,houseType:'0',dtlList:[]},
  102. {name:"热转",type:1,houseType:'0',dtlList:[]},
  103. {name:"打纸",type:2,houseType:'0',dtlList:[]},
  104. {name:"墨水",type:3,houseType:'0',dtlList:[]},
  105. {name:"其他",type:4,houseType:'0',dtlList:[]}
  106. ],
  107. }
  108. },
  109. onLoad(option) {
  110. const v = this
  111. v.init()
  112. },
  113. methods: {
  114. getSelectFabricWTypeDetails(houseType,technologyType){
  115. const v = this
  116. v.$post('/wx/inventory/selectFabricWTypeDetails',{...v.req,houseType,technologyType}).then(res=>{
  117. if(res.code == 200) {
  118. v.dataList[technologyType].dtlList = res.data
  119. }
  120. })
  121. },
  122. init() {
  123. const v = this
  124. uni.showLoading({
  125. title: '加载中'
  126. });
  127. // v.getSelectFabricStatistics()
  128. v.getSelectFabricWDetails()
  129. for (var i = 0; i < v.dataList.length; i++) {
  130. v.getSelectFabricWTypeDetails(v.dataList[i].houseType,v.dataList[i].type)
  131. }
  132. setTimeout(()=>{
  133. uni.hideLoading();
  134. },1500)
  135. },
  136. toRouter(url) {
  137. console.log(123123)
  138. uni.navigateTo({
  139. url: '/pages' + url
  140. })
  141. },
  142. getSelectFabricWDetails() {
  143. const v = this
  144. v.$post('/wx/inventory/selectFabricWDetails', v.req).then(res => {
  145. v.selectFabricWDetailsData = res.data
  146. })
  147. },
  148. getSelectFabricStatistics() {
  149. const v = this
  150. v.$post('/wx/inventory/selectFabricStatistics', {
  151. type: v.fabricStatisticsType
  152. }).then(res => {
  153. v.fabricStatisticsData = res.data
  154. })
  155. },
  156. },
  157. }
  158. </script>
  159. <style lang="less">
  160. .uni-data-checklist {
  161. margin-top: 10rpx;
  162. padding: 16rpx 10rpx;
  163. }
  164. .uni-table-td {
  165. font-size: 24rpx !important;
  166. }
  167. .uni-data-checklist .checklist-group .checklist-box {
  168. margin-right: 20rpx !important;
  169. }
  170. .warehousingDtl {
  171. background-color: #f1f1f1;
  172. min-height: 100vh;
  173. color: #333;
  174. .header-banner {
  175. display: flex;
  176. justify-content: center;
  177. border-bottom: 1px solid #dcdcdc;
  178. view {
  179. width: 40%;
  180. text-align: center;
  181. height: 100rpx;
  182. line-height: 100rpx;
  183. color: #333;
  184. margin: 0 5%;
  185. }
  186. .active {
  187. color: #487CFF;
  188. border-bottom: 2px solid #487CFF;
  189. }
  190. }
  191. }
  192. </style>