warehouse-application-record.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>仓库管理-申请记录-创业帮</title>
  6. <meta name="keywords" content="仓库管理-申请记录-创业帮">
  7. <meta name="description" content="仓库管理-申请记录-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="仓库管理-申请记录-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. <style>.warehouse-application .topline{border-top:1px solid #f2f2f2;}</style>
  17. </head>
  18. <body class="pb0 ovh pt0" style="padding-top:0;">
  19. <div class="warehouse rel warehouse-application" id="app" v-cloak style="height:100vh;background-color: #F6F6F6">
  20. <van-nav-bar class="user_rank_explan_title user_title_normal titlef16 rightc333" left-arrow title="申请记录" @click-left="goback" v-if="toptitleisshow">
  21. <template #left><img src="./static/images/left.png" alt=""></template>
  22. </van-nav-bar>
  23. <van-pull-refresh class="topline" v-model="refreshing" @refresh="onRefresh" style="height:100%;min-height:10vh;">
  24. <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="records.length === 0"></van-empty>
  25. <van-list @load="onLoad" v-model="loading" :finished="finished" finished-text="没有更多数据了" :immediate-check="false" v-if=" records.length !== 0">
  26. <div class="bgcfff p16" v-for="(item,index) in records" :key="index" @click="toDetail(item)" style="border-bottom:.5px solid #f1f1f1">
  27. <div class="df jcsb">
  28. <div class="c333">
  29. <div class="df jcsb aic">
  30. <div class="df aic">
  31. <div class="f14" style="margin-right:.3733rem;">申请时间</div>
  32. <div class="f14">{{item.CreateDate}}</div>
  33. </div>
  34. </div>
  35. <div class="df aic mt8">
  36. <div class="f14" style="margin-right:.3733rem;">申请数量</div>
  37. <div class="f14">{{item.ApplyNum}}台</div>
  38. </div>
  39. </div>
  40. <div class="df aic" :class="item.Status === 1 ? 'c333' : 'c999'">
  41. <div class="f12">{{statusMap.get(item.Status)}}</div>
  42. <van-icon name="arrow" v-if="item.Status === 1" style="margin-left:.16rem"></van-icon>
  43. </div>
  44. </div>
  45. </div>
  46. </van-list>
  47. </van-pull-refresh>
  48. </div>
  49. <script src="./static/js/klm-vv.min.js"></script>
  50. <script src="./static/js/appfunc.min.js"></script>
  51. <script src="./static/js/klm-axios-config.js"></script>
  52. <script src="./static/js/publicfn.js"></script>
  53. <script>
  54. Vue.use(vant.Lazyload);
  55. // 在 #app 标签下渲染一个按钮组件
  56. let app = new Vue({
  57. el: '#app',
  58. data(){
  59. return{
  60. toptitleisshow,
  61. loading: false, //是否处于加载状态,加载过程中不触发load事件
  62. finished: false, //是否已加载完成,加载完成后不再触发load事件
  63. refreshing: false, //是否处于加载中状态
  64. active: 0,
  65. lastactive:0,
  66. statusMap:new Map([[0, "待配货"], [1, "已发货"],[2,'已驳回']]),
  67. pageinfo:{
  68. PageSize:10,
  69. PageNum:1
  70. },
  71. columns:[],
  72. records:[],
  73. activeItem:{
  74. StoreId:'',
  75. BrandId:'',
  76. },
  77. }
  78. },
  79. created(){
  80. //- this.getwarehouselist().then(()=>{
  81. this.getList()
  82. //- })
  83. },
  84. beforeUpdate(){
  85. this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight - 44}px`;
  86. },
  87. methods:{
  88. goback(){
  89. PublicLib.GoBack({Level:1});
  90. },
  91. toDetail(item){
  92. if(item.Status !== 1){return;}
  93. console.log('item',item)
  94. //- item.StoreId = this.columns[this.active].StoreId
  95. //- item.ProductName = this.columns[this.active].ProductName
  96. PublicLib.putCookieInfo('appication-Id', item.Id);
  97. PublicLib.Goto({Url:'warehouse-application-record-detail'});
  98. },
  99. onRefresh() {
  100. this.pageinfo.PageNum = 1;
  101. this.refreshing = true;
  102. //- this.finished = false;
  103. //- this.loading = true;
  104. this.getList();
  105. this.refreshing = false
  106. //- this.onLoad();
  107. },
  108. //- changetab(){
  109. //- if(this.lastactive === this.active) return;
  110. //- this.pageinfo.PageNum = 1;
  111. //- //- this.finished = false;
  112. //- this.lastactive = this.active;
  113. //- this.activeItem.StoreId = this.columns[this.active].StoreId
  114. //- this.activeItem.BrandId = this.columns[this.active].BrandId
  115. //- this.getList();
  116. //- },
  117. async getList(type = 'refresh'){
  118. //- const StoreId = this.columns[this.active].StoreId
  119. //- const BrandId = this.columns[this.active].BrandId
  120. //- console.log(this.activeItem,'activeItem',this.activeItem.BrandId)
  121. const UserId = PublicLib.getCookieInfo('userId');
  122. //- const res = await getRequest('api/v1/storemachineapply/applylist?t='+Math.random(6),JSON.stringify({...this.pageinfo,UserId,...this.activeItem}));
  123. const res = await getRequest('api/v1/storemachineapply/applylist?t='+Math.random(6),JSON.stringify({...this.pageinfo,UserId}));
  124. //- if(res.status !== '1') return tips('获取仓库列表失败');
  125. this.productinfo = res.data;
  126. if (res.data.length < this.pageinfo.PageSize){this.finished = true;}
  127. this.refreshing = false;
  128. this.loading = false;
  129. if(type === 'refresh'){
  130. this.records = res.data
  131. }
  132. if(type === 'onload'){
  133. this.records.push(...res.data)
  134. }
  135. console.log( this.records)
  136. },
  137. onLoad(){
  138. //- console.log('onload')
  139. this.pageinfo.PageNum++;
  140. this.getList('onload')
  141. },
  142. //机具类型、品牌查询
  143. //- async getproducttypelist(){
  144. //- const res = await getRequest('api/v1/pos/kqproducts/list?t='+Math.random(6),JSON.stringify({PageSize:10,PageNum:1}));
  145. //- if(res.status !== '1')return tips('产品列表获取失败!');
  146. //- //- res.data.push({Name: "金控大机", Id: 3},{Name: "开店宝大机", Id: 4});
  147. //- this.columns = res.data.map(item=> {return {Id:item.Id,text:item.Name}});
  148. //- },
  149. async getwarehouselist(){
  150. const UserId = PublicLib.getCookieInfo('userId');
  151. const res = await getRequest('api/v1/storehouse/indexlist?t='+Math.random(6),JSON.stringify({UserId,PageSize:15,PageNum:1}));
  152. if(res.data.length > 0 && res.status === '1') {
  153. //- res.data[0].ProductName = '快钱MOS';
  154. //- res.data[0].LaveNum = '95';
  155. res.data.map(item=> {
  156. if(item.ProductName){
  157. this.columns.push({StoreId:item.Id,text:item.ProductName,BrandId:item.BrandId,ProductName:item.ProductName})
  158. }
  159. });
  160. this.activeItem.StoreId = this.columns[this.active].StoreId
  161. this.activeItem.BrandId = this.columns[this.active].BrandId
  162. };
  163. },
  164. },
  165. })
  166. </script>
  167. </body>
  168. </html>