fabricsTotal.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view class="personalStat">
  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 :date="req.date" @change="changeTime"></commons-select-time>
  12. <view class="" v-if="headerNavType === 1">
  13. <!-- 墨水库存汇总 -->
  14. <view style="margin: 0 30rpx 30rpx;font-size: 12rpx;background:#fff" v-for="(i,index) in issueData" :key="index">
  15. <view class="form-text">
  16. <view class="">
  17. 物料名称:{{i.materialName}}
  18. </view>33333333333333333333333333333333333333333333
  19. <view class="">
  20. 物料编码:{{i.materialCode}}
  21. </view>
  22. </view>
  23. <uni-table border stripe emptyText="暂无更多数据" >
  24. <!-- 表头行 -->
  25. <uni-tr>
  26. <uni-th width="150rpx" align="left">卷数 {{i.count}}</uni-th>
  27. <uni-th width="150rpx" align="left">米数 {{i.quantity}}</uni-th>
  28. <uni-th width="150rpx" align="left">面积 {{i.area}}</uni-th>
  29. </uni-tr>
  30. <!-- 表格数据行 -->
  31. <uni-tr v-for="(j,jindex) in i.materialList" :key="jindex">
  32. <uni-td><view >卷{{jindex + 1}}</view></uni-td>
  33. <uni-td><view >{{j.quantity}}</view></uni-td>
  34. <uni-td><view >****{{j.rfid.slice(18,24)}}</view></uni-td>
  35. </uni-tr>
  36. </uni-table>
  37. </view>
  38. </view>
  39. <view class="" v-if="headerNavType === 2">
  40. <view class="explain">
  41. <view class="title">
  42. 取值说明:<span><uni-icons type="bottom" size="30"></uni-icons> 收起</span>
  43. </view>
  44. <view class="text">
  45. <view>实际使用面积=领料面积-退料面积-修正面积</view>
  46. <view>面料使用率=排班面积/实际使用面积</view>
  47. <view>因早晚班原因,时间取值含跨天情况,例:<span>昨日数据</span></view>
  48. <view>领料面积:昨日7:30————今日7:30领料数据,其中热转的截点是8点</view>
  49. <view>退料面积:昨日10:00————今日10:00退料数据</view>
  50. <view>排班面积=当日排班-当日转班+其他环节报废补班(个人报废排班不累加)</view>
  51. <view><span>特别注明:因转班延误系统将会修正前三天的数据</span></view>
  52. </view>
  53. </view>
  54. <!-- 墨水库存汇总 -->
  55. <view style="margin: 0 30rpx 30rpx;font-size: 12rpx;background:#fff" v-for="(i,index) in materialReturnData" :key="index">
  56. <view class="form-text">
  57. <view class="">
  58. 物料名称:{{i.materialName}}
  59. </view>
  60. <view class="">
  61. 物料编码:{{i.materialCode}}
  62. </view>
  63. </view>
  64. <uni-table border stripe emptyText="暂无更多数据" >
  65. <!-- 表头行 -->
  66. <uni-tr>
  67. <uni-th width="150rpx" align="left">卷数 {{i.count}}</uni-th>
  68. <uni-th width="150rpx" align="left">米数 {{i.quantity}}</uni-th>
  69. <uni-th width="150rpx" align="left">面积 {{i.area}}</uni-th>
  70. </uni-tr>
  71. <!-- 表格数据行 -->
  72. <uni-tr v-for="(j,jindex) in i.materialList" :key="jindex">
  73. <uni-td><view >卷{{jindex + 1}}</view></uni-td>
  74. <uni-td><view >{{j.quantity}}</view></uni-td>
  75. <uni-td><view >****{{j.rfid.slice(18,24)}}</view></uni-td>
  76. </uni-tr>
  77. </uni-table>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import commonsSelectTime from '../../components/commons-select-time/index2.vue'
  84. import {format} from '../../util/uitl.js'
  85. import {
  86. getInfo
  87. } from "@/util/api.js";
  88. export default {
  89. components:{
  90. commonsSelectTime
  91. },
  92. data() {
  93. return {
  94. headerNavType:1,
  95. req:{
  96. account:null,
  97. date:format(new Date()).slice(0,10),
  98. //date:'2022-10-11'
  99. },
  100. issueData:[],
  101. materialReturnData:[],
  102. transferInData:[],
  103. transferOutData:[],
  104. }
  105. },
  106. onLoad(option) {
  107. const v = this
  108. uni.getStorage({
  109. key: 'Authorization',
  110. success: function (res) {
  111. //v.req.account = 2207003
  112. v.req.account = res.data.account
  113. v.getList()
  114. }
  115. });
  116. },
  117. methods: {
  118. changeTime(e){
  119. this.req.date = e
  120. this.getList()
  121. },
  122. timeChangeFn(){
  123. console.log(this.req)
  124. },
  125. toRouter(url){
  126. console.log(123123)
  127. uni.navigateTo({
  128. url: '/pages' + url
  129. })
  130. },
  131. //出库汇总
  132. getList(){
  133. const v = this
  134. v.$post('/stockWater/issue',v.req).then(res=>{
  135. v.issueData = res.data
  136. })
  137. v.$post('/stockWater/materialReturn',v.req).then(res=>{
  138. v.materialReturnData = res.data
  139. })
  140. v.$post('/stockWater/transferIn',v.req).then(res=>{
  141. v.transferInData = res.data
  142. })
  143. v.$post('/stockWater/transferOut',v.req).then(res=>{
  144. v.transferOutData = res.data
  145. })
  146. },
  147. },
  148. }
  149. </script>
  150. <style>
  151. .personalStat .picker-content{
  152. text-align: center;
  153. }
  154. .personalStat .uni-table-th.table--border{
  155. border-top: 1px solid #000;
  156. }
  157. .personalStat .uni-table-th{
  158. border-color: black;
  159. color: #333;
  160. font-weight: 500;
  161. }
  162. .personalStat .uni-table-th,.personalStat .table--border{
  163. border-right:none!important;
  164. }
  165. .personalStat .uni-date-x--border{
  166. border:none!important;
  167. }
  168. </style>
  169. <style lang="less">
  170. .form-text{
  171. font-size: 28rpx;
  172. line-height: 60rpx;
  173. background-color: #fff;
  174. padding-left: 20rpx;
  175. }
  176. .commons-time-box{
  177. display: flex;
  178. height: 50rpx;
  179. line-height: 50rpx;
  180. font-size: 24rpx;
  181. margin:30rpx;
  182. border:1px solid #dcdcdc;
  183. border-radius: 8rpx;
  184. .time-box{
  185. width: 15%;
  186. text-align: center;
  187. }
  188. .time-box-icon{
  189. width: 10%;
  190. }
  191. .time-box.active{
  192. background-color: #487CFF;
  193. color: #fff;
  194. }
  195. }
  196. .uni-data-checklist{
  197. margin-top: 10rpx;
  198. padding:16rpx 10rpx;
  199. }
  200. .uni-table-td{
  201. font-size: 24rpx!important;
  202. }
  203. .uni-data-checklist .checklist-group .checklist-box{
  204. margin-right: 20rpx!important;
  205. }
  206. .personalStat {
  207. background-color: #f1f1f1;
  208. min-height: 100vh;
  209. color: #333;
  210. .header-banner {
  211. display: flex;
  212. justify-content: center;
  213. border-bottom: 1px solid #dcdcdc;
  214. view {
  215. width: 40%;
  216. text-align: center;
  217. height: 100rpx;
  218. line-height: 100rpx;
  219. color: #333;
  220. margin: 0 5%;
  221. }
  222. .active {
  223. color: #487CFF;
  224. border-bottom: 2px solid #487CFF;
  225. }
  226. }
  227. }
  228. </style>