warehouse-mini.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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>
  17. .van-checkbox__icon--checked .van-icon {
  18. color: #333;
  19. background-color: #1989fa;
  20. border-color: #1989fa;
  21. }
  22. </style>
  23. </head>
  24. <body class="pb0 ovh pt0">
  25. <div class="warehouse-mini" id="app" v-cloak style="height:100vh;">
  26. <van-nav-bar class="user_rank_explan_title user_title_normal titlef16 rightc333" left-arrow title="机具申请" v-if="toptitleisshow" @click-left="goback">
  27. <template #left><img src="./static/images/left.png" alt=""></template>
  28. </van-nav-bar>
  29. <van-cell class="mt12" @click="notUse">
  30. <template #title>
  31. <div class="f14">不使用</div>
  32. </template>
  33. <template #icon>
  34. <van-checkbox class="mr16" checked-color="#FFD500" v-model="checked"></van-checkbox>
  35. </template>
  36. </van-cell>
  37. <van-checkbox-group v-model="result">
  38. <van-cell-group>
  39. <van-cell class="machine-list" v-if="formInfo.length === 0">
  40. <template #title>
  41. <div class="f14 warp">
  42. <div class="vm c333 ml16">暂无预发机</div>
  43. </div>
  44. </template>
  45. </van-cell>
  46. <van-cell class="machine-list" v-for="item,index in formInfo" clickable :key="item.Id" @click="toggle(index)" center>
  47. <template #title>
  48. <div class="f14 warp">
  49. <div class="vm c333">Sn: {{item.SnNo}}</div>
  50. <div class="vm c999">来源仓库: {{item.StoreName}}</div>
  51. </div>
  52. </template>
  53. <template #icon>
  54. <van-checkbox class="mr16" :name="item" ref="checkboxes" checked-color="#FFD500"></van-checkbox>
  55. </template>
  56. </van-cell>
  57. </van-cell-group>
  58. </van-checkbox-group>
  59. <van-goods-action class="mall-bottom">
  60. <van-goods-action-button class="kxs-btn" type="default" color="#FFD500" style="color:#333;" text="确认申请" :disabled="!checked &amp;&amp; result.length===0" @click="onClickButton"></van-goods-action-button>
  61. </van-goods-action>
  62. </div>
  63. <script src="./static/js/klm-vv.min.js"></script>
  64. <script src="./static/js/appfunc.min.js"></script>
  65. <script src="./static/js/klm-axios-config.js"></script>
  66. <script src="./static/js/publicfn.js"></script>
  67. <script>
  68. Vue.use(vant.Lazyload);
  69. let app = new Vue({
  70. el: '#app',
  71. data(){
  72. return{
  73. toptitleisshow,
  74. checked:false,
  75. formInfo:[],
  76. pageinfo:{
  77. PageSize:10,
  78. PageNum:1
  79. },
  80. result:[],
  81. }
  82. },
  83. watch:{
  84. checked:function(now,pre){
  85. if(now === true){
  86. this.result = []
  87. }
  88. }
  89. },
  90. created(){
  91. this.getpreInfo()
  92. },
  93. methods:{
  94. goback(){
  95. PublicLib.GoBack({Level:1});
  96. },
  97. async getpreInfo(){
  98. let {PageSize,PageNum} = this.pageinfo
  99. const BrandId = JSON.parse(PublicLib.getCookieInfo('chooseProductId')).Id;
  100. const ToUserId = PublicLib.getCookieInfo('userId');
  101. const res = await getRequest('api/v1/pos/presendstockdetail/list?t='+Math.random(6),JSON.stringify({BrandId,ToUserId,PageSize,PageNum}));
  102. if(res.status !== '1') return tips('初始化失败!')
  103. this.formInfo = res.data
  104. },
  105. toggle(index){
  106. this.checked = false
  107. this.$refs.checkboxes[index].toggle();
  108. //- console.log(i,'result',this.result)
  109. },
  110. notUse(){
  111. this.checked = !this.checked
  112. },
  113. onClickButton(){
  114. PublicLib.putCookieInfo('getSetSnList', JSON.stringify(this.result));
  115. //- console.log(this.result)
  116. PublicLib.GoBack({Level:1});
  117. }
  118. },
  119. })
  120. </script>
  121. </body>
  122. </html>