personalStat.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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 @click="headerNavType = 3" :class="headerNavType == 3 ? 'active' : ''">
  11. 转入
  12. </view>
  13. <view @click="headerNavType = 4" :class="headerNavType == 4 ? 'active' : ''">
  14. 转出
  15. </view>
  16. </view>
  17. <commons-select-time :date="req.date" @change="changeTime"></commons-select-time>
  18. <view class="" v-if="headerNavType === 1">
  19. <!-- 墨水库存汇总 -->
  20. <view style="margin: 0 30rpx 30rpx;font-size: 12rpx;background:#fff" v-for="(i,index) in issueData" :key="index">
  21. <view class="form-text">
  22. <view class="">
  23. 物料名称:{{i.materialName}}
  24. </view>
  25. <view class="">
  26. 物料编码:{{i.materialCode}}
  27. </view>
  28. </view>
  29. <uni-table border stripe emptyText="暂无更多数据" >
  30. <!-- 表头行 -->
  31. <uni-tr>
  32. <uni-th width="150rpx" align="left">卷数 {{i.count}}</uni-th>
  33. <uni-th width="150rpx" align="left">米数 {{i.quantity}}</uni-th>
  34. <uni-th width="150rpx" align="left">面积 {{i.area}}</uni-th>
  35. </uni-tr>
  36. <!-- 表格数据行 -->
  37. <uni-tr v-for="(j,jindex) in i.materialList" :key="jindex">
  38. <uni-td><view >卷{{jindex + 1}}</view></uni-td>
  39. <uni-td><view >{{j.quantity}}</view></uni-td>
  40. <uni-td><view >****{{j.rfid.slice(18,24)}}</view></uni-td>
  41. </uni-tr>
  42. </uni-table>
  43. </view>
  44. </view>
  45. <view class="" v-if="headerNavType === 2">
  46. <!-- 墨水库存汇总 -->
  47. <view style="margin: 0 30rpx 30rpx;font-size: 12rpx;background:#fff" v-for="(i,index) in materialReturnData" :key="index">
  48. <view class="form-text">
  49. <view class="">
  50. 物料名称:{{i.materialName}}
  51. </view>
  52. <view class="">
  53. 物料编码:{{i.materialCode}}
  54. </view>
  55. </view>
  56. <uni-table border stripe emptyText="暂无更多数据" >
  57. <!-- 表头行 -->
  58. <uni-tr>
  59. <uni-th width="150rpx" align="left">卷数 {{i.count}}</uni-th>
  60. <uni-th width="150rpx" align="left">米数 {{i.quantity}}</uni-th>
  61. <uni-th width="150rpx" align="left">面积 {{i.area}}</uni-th>
  62. </uni-tr>
  63. <!-- 表格数据行 -->
  64. <uni-tr v-for="(j,jindex) in i.materialList" :key="jindex">
  65. <uni-td><view >卷{{jindex + 1}}</view></uni-td>
  66. <uni-td><view >{{j.quantity}}</view></uni-td>
  67. <uni-td><view >****{{j.rfid.slice(18,24)}}</view></uni-td>
  68. </uni-tr>
  69. </uni-table>
  70. </view>
  71. </view>
  72. <view class="" v-if="headerNavType === 3">
  73. <!-- 墨水库存汇总 -->
  74. <view style="margin: 0 30rpx 30rpx;font-size: 12rpx;background:#fff" v-for="(i,index) in transferInData" :key="index">
  75. <view class="form-text">
  76. <view class="">
  77. 物料名称:{{i.materialName}}
  78. </view>
  79. <view class="">
  80. 物料编码:{{i.materialCode}}
  81. </view>
  82. <view class="">
  83. 提交人:{{i.submitUser}}
  84. </view>
  85. <view class="">
  86. 接收人:{{i.receiveUser}}
  87. </view>
  88. </view>
  89. <uni-table border stripe emptyText="暂无更多数据" >
  90. <!-- 表头行 -->
  91. <uni-tr>
  92. <uni-th width="150rpx" align="left">卷数 {{i.count}}</uni-th>
  93. <uni-th width="150rpx" align="left">米数 {{i.quantity}}</uni-th>
  94. <uni-th width="150rpx" align="left">面积 {{i.area}}</uni-th>
  95. </uni-tr>
  96. <!-- 表格数据行 -->
  97. <uni-tr v-for="(j,jindex) in i.materialList" :key="jindex">
  98. <uni-td><view >卷{{jindex + 1}}</view></uni-td>
  99. <uni-td><view ></view></uni-td>
  100. <uni-td><view >{{j.quantity}}</view></uni-td>
  101. </uni-tr>
  102. </uni-table>
  103. </view>
  104. </view>
  105. <view class="" v-if="headerNavType === 4">
  106. <!-- 墨水库存汇总 -->
  107. <view style="margin: 0 30rpx 30rpx;font-size: 12rpx;background:#fff" v-for="(i,index) in transferOutData" :key="index">
  108. <view class="form-text">
  109. <view class="">
  110. 物料名称:{{i.materialName}}
  111. </view>
  112. <view class="">
  113. 物料编码:{{i.materialCode}}
  114. </view>
  115. <view class="">
  116. 提交人:{{i.submitUser}}
  117. </view>
  118. <view class="">
  119. 接收人:{{i.receiveUser}}
  120. </view>
  121. </view>
  122. <uni-table border stripe emptyText="暂无更多数据" >
  123. <!-- 表头行 -->
  124. <uni-tr>
  125. <uni-th width="150rpx" align="left">卷数 {{i.count}}</uni-th>
  126. <uni-th width="150rpx" align="left">米数 {{i.quantity}}</uni-th>
  127. <uni-th width="150rpx" align="left">面积 {{i.area}}</uni-th>
  128. </uni-tr>
  129. <!-- 表格数据行 -->
  130. <uni-tr v-for="(j,jindex) in i.materialList" :key="jindex">
  131. <uni-td><view >卷{{jindex + 1}}</view></uni-td>
  132. <uni-td><view ></view></uni-td>
  133. <uni-td><view >{{j.quantity}}</view></uni-td>
  134. </uni-tr>
  135. </uni-table>
  136. </view>
  137. </view>
  138. </view>
  139. </template>
  140. <script>
  141. import commonsSelectTime from '../../components/commons-select-time/index2.vue'
  142. import {format} from '../../util/uitl.js'
  143. import {
  144. getInfo
  145. } from "@/util/api.js";
  146. export default {
  147. components:{
  148. commonsSelectTime
  149. },
  150. data() {
  151. return {
  152. headerNavType:1,
  153. req:{
  154. account:null,
  155. date:format(new Date()).slice(0,10),
  156. //date:'2022-10-11'
  157. },
  158. issueData:[],
  159. materialReturnData:[],
  160. transferInData:[],
  161. transferOutData:[],
  162. }
  163. },
  164. onLoad(option) {
  165. const v = this
  166. uni.getStorage({
  167. key: 'Authorization',
  168. success: function (res) {
  169. //v.req.account = 2207003
  170. v.req.account = res.data.account
  171. v.getList()
  172. }
  173. });
  174. },
  175. methods: {
  176. changeTime(e){
  177. this.req.date = e
  178. this.getList()
  179. },
  180. timeChangeFn(){
  181. console.log(this.req)
  182. },
  183. toRouter(url){
  184. console.log(123123)
  185. uni.navigateTo({
  186. url: '/pages' + url
  187. })
  188. },
  189. //出库汇总
  190. getList(){
  191. const v = this
  192. v.$post('/stockWater/issue',v.req).then(res=>{
  193. v.issueData = res.data
  194. })
  195. v.$post('/stockWater/materialReturn',v.req).then(res=>{
  196. v.materialReturnData = res.data
  197. })
  198. v.$post('/stockWater/transferIn',v.req).then(res=>{
  199. v.transferInData = res.data
  200. })
  201. v.$post('/stockWater/transferOut',v.req).then(res=>{
  202. v.transferOutData = res.data
  203. })
  204. },
  205. },
  206. }
  207. </script>
  208. <style>
  209. .personalStat .picker-content{
  210. text-align: center;
  211. }
  212. .personalStat .uni-table-th.table--border{
  213. border-top: 1px solid #000;
  214. }
  215. .personalStat .uni-table-th{
  216. border-color: black;
  217. color: #333;
  218. font-weight: 500;
  219. }
  220. .personalStat .uni-table-th,.personalStat .table--border{
  221. border-right:none!important;
  222. }
  223. .personalStat .uni-date-x--border{
  224. border:none!important;
  225. }
  226. </style>
  227. <style lang="less">
  228. .form-text{
  229. font-size: 28rpx;
  230. line-height: 60rpx;
  231. background-color: #fff;
  232. padding-left: 20rpx;
  233. }
  234. .commons-time-box{
  235. display: flex;
  236. height: 50rpx;
  237. line-height: 50rpx;
  238. font-size: 24rpx;
  239. margin:30rpx;
  240. border:1px solid #dcdcdc;
  241. border-radius: 8rpx;
  242. .time-box{
  243. width: 15%;
  244. text-align: center;
  245. }
  246. .time-box-icon{
  247. width: 10%;
  248. }
  249. .time-box.active{
  250. background-color: #487CFF;
  251. color: #fff;
  252. }
  253. }
  254. .uni-data-checklist{
  255. margin-top: 10rpx;
  256. padding:16rpx 10rpx;
  257. }
  258. .uni-table-td{
  259. font-size: 24rpx!important;
  260. }
  261. .uni-data-checklist .checklist-group .checklist-box{
  262. margin-right: 20rpx!important;
  263. }
  264. .personalStat {
  265. background-color: #f1f1f1;
  266. min-height: 100vh;
  267. color: #333;
  268. .header-banner {
  269. display: flex;
  270. justify-content: center;
  271. border-bottom: 1px solid #dcdcdc;
  272. view {
  273. width: 40%;
  274. text-align: center;
  275. height: 100rpx;
  276. line-height: 100rpx;
  277. color: #333;
  278. margin: 0 5%;
  279. }
  280. .active {
  281. color: #487CFF;
  282. border-bottom: 2px solid #487CFF;
  283. }
  284. }
  285. }
  286. </style>