product-profit-search.html 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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="bgc-back h100p ovh">
  18. <div id="app" v-cloak>
  19. <div class="search-box">
  20. <van-search v-model="value" show-action placeholder="请输入机具SN号或扫描" @search="onsearch">
  21. <template #action><span class="vm pl16 pr16 more" @click="goback">取消</span></template>
  22. <template #right-icon><span class="pl8" @click="onScan"><img class="vm" src="./static/images/icon-scan@3x.png" alt="" width="20" height="20"></span></template>
  23. </van-search>
  24. </div>
  25. <van-row v-cloak>
  26. <van-col span="24">
  27. <div class="ovh-x" ref="wrapper2">
  28. <van-cell-group class="dialoutrecord" :border="false">
  29. <van-cell v-for="item,index in transactions" :title="item.FromDate" :value="item.SnType" title-class="f14 c333" value-class="f12 c999" center>
  30. <template #label>
  31. <div class="f999">SN: {{item.SnNo}}</div>
  32. <div class="f999 makerinfo">拨出至: {{item.MakerName}}{{item.MakerCode}}</div>
  33. </template>
  34. </van-cell>
  35. </van-cell-group>
  36. </div>
  37. </van-col>
  38. </van-row>
  39. </div>
  40. <script src="./static/js/klm-vv.min.js"></script>
  41. <script src="./static/js/appfunc.min.js"></script>
  42. <script src="./static/js/klm-axios-config.js"></script>
  43. <script src="./static/js/publicfn.js"></script>
  44. <script>
  45. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  46. // 可以通过下面的方式手动注册
  47. Vue.use(vant.Lazyload);
  48. PublicLib.SetStatusBarBgColor({bgcolor:'ffffff'});
  49. // 在 #app 标签下渲染一个按钮组件
  50. let app = new Vue({
  51. el: '#app',
  52. data() {
  53. return {
  54. transactions: [
  55. ],
  56. value: '',
  57. pageinfo:{
  58. PageSize:100,
  59. PageNum:1
  60. }
  61. };
  62. },
  63. mounted() {
  64. scan(this.value,this.getprofitlist);
  65. this.$nextTick(() => {
  66. this.$refs.wrapper2.style.height = `${document.documentElement.clientHeight - 55}px`;
  67. });
  68. },
  69. methods: {
  70. onsearch(){
  71. this.getprofitlist();
  72. },
  73. goback() {
  74. PublicLib.GoBack({Level:1});
  75. },
  76. onScan(){
  77. PublicLib.ScanQRCode();
  78. },
  79. async getprofitlist(){
  80. //- PublicLib.ShowLoading({Message:''});
  81. const BrandId = PublicLib.getCookieInfo('productMachineId');
  82. const UserId = PublicLib.getCookieInfo('userId');
  83. const res = await getRequest('api/v1/pos/storechangehistory/outrecords?t='+Math.random(6),JSON.stringify({...this.pageinfo,SnNo:this.value,BrandId,UserId}));
  84. if(res.status !== '1')return tips('交易分润列表获取失败!');
  85. //- PublicLib.HideLoading();
  86. this.transactions =[
  87. ]
  88. this.transactions.push(...res.data);
  89. },
  90. }
  91. });
  92. </script>
  93. </body>
  94. </html>