warehouse-record.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. </head>
  17. <body class="pb0 ovh pt0" style="padding-top:0;background-color:#f6f6f6;">
  18. <div class="warehouse rel" id="app" v-cloak>
  19. <van-nav-bar class="user_rank_explan_title user_title_normal titlef16 rightc333" left-arrow title="划拨记录" v-if="toptitleisshow" @click-left="goback">
  20. <template #left><img src="./static/images/left.png" alt=""></template>
  21. </van-nav-bar>
  22. <van-search class="top_search" v-model="searchContent" show-action placeholder="根据SN号搜索订单" @search="onSearch">
  23. <template #action>
  24. <div class="searchcolor" @click="onSearch">搜索</div>
  25. </template>
  26. </van-search>
  27. <van-tabs v-model="active" line-width="30" animated @change="changetab" swipeable>
  28. <van-tab title="拨入记录">
  29. <div class="ovh-x" ref="wrapper1">
  30. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;min-height:10vh;">
  31. <div class="nodata c999 f14 tc mt16" v-if="productinfo.length === 0">暂无任何记录</div>
  32. <van-list @load="onLoad" v-model="loading" :finished="finished" finished-text="没有更多数据了" :immediate-check="false" v-if="active === 0 &amp;&amp; productinfo.length !== 0">
  33. <div class="panel rel bgcfff pt16 pb16 bottom_line" v-for="item,index in productinfo">
  34. <div class="info f14 c333">
  35. <div class="item mt8 df jcsb mt16" style="justify-content:space-between;">
  36. <div class="c999 f14">SN号:</div>
  37. <div>
  38. <div class="ml4 c333">{{item.SnNo}}</div>
  39. </div>
  40. </div>
  41. <div class="item mt8 df jcsb mt16" style="justify-content:space-between;">
  42. <div class="c999 f14">划拨时间:</div>
  43. <div class="ml4 c333">{{item.CreateDate}}</div>
  44. </div>
  45. <div class="item mt8 df jcsb pt4" style="justify-content:space-between;">
  46. <div class="c999 f14">来源仓库:</div>
  47. <div class="ml4 c333">{{item.StoreInfo.StoreName}}</div>
  48. </div>
  49. <div class="item mt8 df jcsb pt4" style="justify-content:space-between;">
  50. <div class="c999 f14">管理员:</div>
  51. <div class="ml4 c333">{{item.UserInfo.RealName}} {{item.UserInfo.MakerCode}}</div>
  52. </div>
  53. <div class="item mt8 df jcsb pt4" style="justify-content:space-between;">
  54. <div class="c999 f14">联系电话:</div>
  55. <div class="df">
  56. <div class="c333">{{item.UserInfo.Mobile}}</div>
  57. <div class="f12 c666 ml16 spcolor" @click="takephone(item.UserInfo.Mobile)">拨号</div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </van-list>
  63. </van-pull-refresh>
  64. </div>
  65. </van-tab>
  66. <van-tab title="拨出记录">
  67. <div class="ovh-x" ref="wrapper1">
  68. <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;min-height:10vh;">
  69. <div class="nodata c999 f14 tc mt16" v-if="productinfo.length === 0">暂无任何记录</div>
  70. <van-list @load="onLoad" v-model="loading" :finished="finished" finished-text="没有更多数据了" :immediate-check="false" v-if="active === 1 &amp;&amp; productinfo.length !== 0">
  71. <div class="panel rel bgcfff pt16 pb16 bottom_line" v-for="item,index in productinfo">
  72. <div class="info f14 c333">
  73. <div class="item mt8 df jcsb mt16" style="justify-content:space-between;">
  74. <div class="c999 f14">SN号:</div>
  75. <div>
  76. <div class="ml4 c333">{{item.SnNo}}</div>
  77. </div>
  78. </div>
  79. <div class="item mt8 df jcsb mt16" style="justify-content:space-between;">
  80. <div class="c999 f14">划拨时间:</div>
  81. <div class="ml4 c333">{{item.CreateDate}}</div>
  82. </div>
  83. <div class="item mt8 df jcsb pt4" style="justify-content:space-between;">
  84. <div class="c999 f14">拨出至:</div>
  85. <div class="ml4 c333">{{item.UserInfo.RealName}} {{item.UserInfo.MakerCode}}</div>
  86. </div>
  87. <div class="item mt8 df jcsb pt4" style="justify-content:space-between;">
  88. <div class="c999 f14">联系电话:</div>
  89. <div class="df">
  90. <div class="c333">{{item.UserInfo.Mobile}}</div>
  91. <div class="f12 c666 ml16 spcolor" @click="takephone(item.UserInfo.Mobile)">拨号</div>
  92. </div>
  93. </div>
  94. <div class="item mt8 df jcsb pt4" style="justify-content:space-between;">
  95. <div class="c999 f14">订单号:</div>
  96. <div class="ml4 c333">{{item.ChangeNo}}</div>
  97. </div>
  98. </div>
  99. </div>
  100. </van-list>
  101. </van-pull-refresh>
  102. </div>
  103. </van-tab>
  104. </van-tabs>
  105. </div>
  106. <script src="./static/js/clipboard.min.js"></script>
  107. <script src="./static/js/klm-vv.min.js"></script>
  108. <script src="./static/js/appfunc.min.js"></script>
  109. <script src="./static/js/klm-axios-config.js"></script>
  110. <script src="./static/js/publicfn.js"></script>
  111. <script>
  112. function OnStart(){
  113. app.active = 0;
  114. app.backgetwarehouselist();
  115. };
  116. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  117. // 可以通过下面的方式手动注册
  118. Vue.use(vant.Lazyload);
  119. // 在 #app 标签下渲染一个按钮组件
  120. let app = new Vue({
  121. el: '#app',
  122. data() {
  123. return {
  124. toptitleisshow:true,
  125. active: 0,
  126. lastactive:0,
  127. overisshow:false,
  128. loading: false,
  129. finished: false,
  130. refreshing: false,
  131. searchContent:'',
  132. productinfo:[
  133. ],
  134. showDate: false,
  135. pageinfo:{
  136. PageSize:10,
  137. PageNum:1
  138. },
  139. };
  140. },
  141. created() {
  142. this.toptitleisshow = toptitleisshow;
  143. this.getwarehouselist();
  144. },
  145. beforeUpdate() {
  146. this.$nextTick(() => {
  147. this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight - 98}px`;
  148. });
  149. },
  150. methods: {
  151. changetab(){
  152. if(this.lastactive === this.active) return;
  153. this.pageinfo.PageNum = 1;
  154. this.finished = false;
  155. this.lastactive = this.active;
  156. this.backgetwarehouselist();
  157. },
  158. onLoad() {
  159. this.pageinfo.PageNum++;
  160. if(this.active === 3){
  161. this.productinfo = [];
  162. }else{
  163. this.getwarehouselist();
  164. };
  165. },
  166. onRefresh() {
  167. this.searchContent = '';
  168. this.loading = true;
  169. this.pageinfo.PageNum = 1;
  170. this.backgetwarehouselist();
  171. },
  172. //- 点击搜索
  173. onSearch(){
  174. //- if(this.searchContent === '')return;
  175. this.productinfo = [];
  176. this.pageinfo.PageNum = 1;
  177. this.getwarehouselist();
  178. },
  179. //- 获取仓库列表
  180. async getwarehouselist(){
  181. const StoreId = PublicLib.getCookieInfo('warehouseId');
  182. let Url = '';
  183. switch(this.active){
  184. case 0:
  185. Url = 'api/v1/storestockchange/in?t=';
  186. break;
  187. case 1:
  188. Url = 'api/v1/storestockchange/out?t=';
  189. break;
  190. };
  191. const res = await getRequest(Url+Math.random(6),JSON.stringify({...this.pageinfo,StoreId,SearchKey:this.searchContent}));
  192. if(res.status !== '1') return tips('获取记录失败');
  193. if(res.data.length < this.pageinfo.PageSize) {
  194. this.finished = true;
  195. };
  196. this.productinfo.push(...res.data);
  197. this.loading = false;
  198. },
  199. async backgetwarehouselist(){
  200. const StoreId = PublicLib.getCookieInfo('warehouseId');
  201. let Url = '';
  202. switch(this.active){
  203. case 0:
  204. Url = 'api/v1/storestockchange/in?t=';
  205. break;
  206. case 1:
  207. Url = 'api/v1/storestockchange/out?t=';
  208. break;
  209. };
  210. const res = await getRequest(Url+Math.random(6),JSON.stringify({...this.pageinfo,StoreId,SearchKey:this.searchContent}));
  211. if(res.status !== '1') return tips('获取记录失败');
  212. if(res.data.length < this.pageinfo.PageSize) {
  213. this.finished = true;
  214. };
  215. this.productinfo = res.data;
  216. this.loading = false;
  217. this.refreshing = false;
  218. },
  219. goback(){
  220. PublicLib.GoBack({Level:1});
  221. },
  222. //- 拨打电话
  223. takephone(phonenum){
  224. PublicLib.PhoneCall(phonenum);
  225. },
  226. }
  227. });
  228. </script>
  229. </body>
  230. </html>