warehouseDtl.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <template>
  2. <view class="warehousingDtl">
  3. <view class="header-banner">
  4. <view @click="headerNavType = 1" :class="headerNavType == 1 ? 'active' : ''">
  5. 面料
  6. </view>
  7. <view @click="headerNavType = 2" :class="headerNavType == 2 ? 'active' : ''">
  8. 墨水
  9. </view>
  10. </view>
  11. <commons-select-time @change="timeInit" v-model="req"></commons-select-time>
  12. <view v-if="headerNavType == 2">
  13. <view class="commons-title">
  14. <view class="">
  15. 领料详情
  16. </view>
  17. </view>
  18. <view style="margin: 0 30rpx;font-size: 12rpx;">
  19. <uni-table border stripe emptyText="暂无更多数据">
  20. <!-- 表头行 -->
  21. <uni-tr>
  22. <uni-th width="90rpx" align="left"></uni-th>
  23. <uni-th width="150rpx" align="left">件</uni-th>
  24. <uni-th width="150rpx" align="left">公斤</uni-th>
  25. <uni-th width="150rpx" align="left">金额</uni-th>
  26. </uni-tr>
  27. <!-- 表格数据行 -->
  28. <uni-tr>
  29. <uni-td><view class="pa-bg-2">合计</view>1</uni-td>
  30. <uni-td><view class="pa-bg-2">{{selectInkEWDetailsData.total}}</view></uni-td>
  31. <uni-td><view class="pa-bg-2">{{selectInkEWDetailsData.amountQuantity}}</view></uni-td>
  32. <uni-td><view class="pa-bg-2">{{selectInkEWDetailsData.amountTotal}}</view></uni-td>
  33. </uni-tr>
  34. <uni-tr v-for="(i,index) in selectInkEWDetailsData.details" :key="index">
  35. <uni-td>{{i.nickName}}</uni-td>
  36. <uni-td>{{i.count}}</uni-td>
  37. <uni-td>{{i.changeNum}}</uni-td>
  38. <uni-td>{{i.amount}}</uni-td>
  39. </uni-tr>
  40. </uni-table>
  41. </view>
  42. </view>
  43. <view v-if="headerNavType == 1">
  44. <view class="commons-title">
  45. <view class="">
  46. 领料详情
  47. </view>
  48. <view>
  49. <uni-data-checkbox v-model="companyType" :localdata="companyList" />
  50. </view>
  51. </view>
  52. <view style="margin: 0 30rpx;font-size: 24rpx;">
  53. <uni-table border stripe emptyText="暂无更多数据" >
  54. <!-- 表头行 -->
  55. <uni-tr>
  56. <uni-th width="90rpx" align="left"></uni-th>
  57. <uni-th v-if="companyType == 3" width="150rpx" align="left">排班</uni-th>
  58. <uni-th width="150rpx" align="left">领料</uni-th>
  59. <uni-th v-if="companyType == 3" width="150rpx" align="left">产出比</uni-th>
  60. </uni-tr>
  61. <uni-tr v-for="(i,index) in totalData" :key="index">
  62. <uni-td>
  63. <view :class="i.type == 1 ? 'pa-bg-2' : i.type == 2 ? 'pa-bg' : 'pa-bg-3'">{{i.realName}}</view>
  64. <span v-if="i.type == 1 || i.type == 2">1</span>
  65. </uni-td>
  66. <uni-td v-if="companyType == 3">
  67. <view :class="i.type == 1 ? 'pa-bg-2' : i.type == 2 ? 'pa-bg' : 'pa-bg-3'">{{companyType == 3? i.planArea*1 : '-'}}</view>
  68. </uni-td>
  69. <uni-td v-if="companyType == 1">
  70. <view :class="i.type == 1 ? 'pa-bg-2' : i.type == 2 ? 'pa-bg' : ''">{{i.pcs}}</view>
  71. </uni-td>
  72. <uni-th v-if="companyType == 0" align="left">
  73. <view :class="i.type == 1 ? 'pa-bg-2' : i.type == 2 ? 'pa-bg' : ''">{{i.amount}}</view>
  74. </uni-th>
  75. <uni-th v-if="companyType == 2" align="left">
  76. <view :class="i.type == 1 ? 'pa-bg-2' : i.type == 2 ? 'pa-bg' : ''">{{i.quantity}}</view>
  77. </uni-th>
  78. <uni-td v-if="companyType == 3">
  79. <view :class="i.type == 1 ? 'pa-bg-2' : i.type == 2 ? 'pa-bg' : ''">{{i.area}}</view>
  80. </uni-td>
  81. <uni-td v-if="companyType == 3">
  82. <view :class="i.type == 1 ? 'pa-bg-2' : i.type == 2 ? 'pa-bg' : ''">{{i.outputRatio * 1}}%</view>
  83. </uni-td>
  84. </uni-tr>
  85. <!-- <uni-tr v-for="(i,index) in totalData" :key="index">
  86. <uni-td>{{i.realName}}</uni-td>
  87. <uni-td>{{i.pcs}}</uni-td>
  88. <uni-td>{{i.quantity}}</uni-td>
  89. <uni-td>{{i.planArea}}</uni-td>
  90. <uni-td>{{i.outputRatio}}%</uni-td>
  91. </uni-tr> -->
  92. </uni-table>
  93. </view>
  94. </view>
  95. </view>
  96. </template>
  97. <script>
  98. import commonsSelectTime from '../../components/commons-select-time/index.vue'
  99. import {
  100. getInfo
  101. } from "@/util/api.js";
  102. export default {
  103. components:{
  104. commonsSelectTime
  105. },
  106. data() {
  107. return {
  108. companyType:3,
  109. companyList:[
  110. {
  111. text:"金额",
  112. value:0
  113. },
  114. {
  115. text:"件",
  116. value:1
  117. },
  118. {
  119. text:"米",
  120. value:2
  121. },
  122. {
  123. text:"平方",
  124. value:3
  125. },
  126. ],
  127. warehouseList:[{
  128. text:"全部",
  129. value:'0'
  130. },
  131. {
  132. text:"一楼",
  133. value:'1'
  134. },{
  135. text:"四楼",
  136. value:'2'
  137. }],
  138. req:{
  139. type: 0,
  140. time: [],
  141. beginTime: null,
  142. endTime: null,
  143. },
  144. headerNavType:1,
  145. totalData:[],
  146. selectInkEWDetailsData:[],
  147. }
  148. },
  149. onLoad(option) {
  150. console.log(option.type)
  151. if(option.type == 2){
  152. this.headerNavType = 2
  153. }
  154. const v = this
  155. v.timeInit()
  156. },
  157. methods: {
  158. timeInit(){
  159. const v = this
  160. v.getSelectInkEWDetails()
  161. v.getSelectFabricWDetails()
  162. },
  163. toRouter(url){
  164. uni.navigateTo({
  165. url: '/pages' + url
  166. })
  167. },
  168. getSelectFabricWDetails(){
  169. const v = this
  170. v.$post('/applet/selectFabricEWDetails',{type:v.req.type,beginTime:v.req.beginTime,endTime:v.req.endTime}).then(res=>{
  171. v.totalData = res.data
  172. console.log(v.totalData)
  173. })
  174. },
  175. getSelectInkEWDetails(){
  176. const v = this
  177. v.$post('/applet/selectInkEWDetails',v.req).then(res=>{
  178. v.selectInkEWDetailsData = res.data
  179. })
  180. },
  181. },
  182. }
  183. </script>
  184. <style lang="less">
  185. .uni-data-checklist{
  186. margin-top: 10rpx;
  187. padding:16rpx 10rpx;
  188. }
  189. .uni-table-td{
  190. font-size: 24rpx!important;
  191. }
  192. .uni-data-checklist .checklist-group .checklist-box{
  193. margin-right: 20rpx!important;
  194. }
  195. .warehousingDtl {
  196. background-color: #f1f1f1;
  197. min-height: 100vh;
  198. color: #333;
  199. .header-banner {
  200. display: flex;
  201. justify-content: center;
  202. border-bottom: 1px solid #dcdcdc;
  203. view {
  204. width: 40%;
  205. text-align: center;
  206. height: 100rpx;
  207. line-height: 100rpx;
  208. color: #333;
  209. margin: 0 5%;
  210. }
  211. .active {
  212. color: #487CFF;
  213. border-bottom: 2px solid #487CFF;
  214. }
  215. }
  216. }
  217. </style>