123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>机具申请-预发机</title>
- <meta name="keywords" content="机具申请-预发机">
- <meta name="description" content="机具申请-预发机">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="机具申请-预发机">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- <style>
- .van-checkbox__icon--checked .van-icon {
- color: #333;
- background-color: #1989fa;
- border-color: #1989fa;
- }
-
- </style>
- </head>
- <body class="pb0 ovh pt0">
- <div class="warehouse-mini" id="app" v-cloak style="height:100vh;">
- <van-nav-bar class="user_rank_explan_title user_title_normal titlef16 rightc333" left-arrow title="机具申请" v-if="toptitleisshow" @click-left="goback">
- <template #left><img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <van-cell class="mt12" @click="notUse">
- <template #title>
- <div class="f14">不使用</div>
- </template>
- <template #icon>
- <van-checkbox class="mr16" checked-color="#FFD500" v-model="checked"></van-checkbox>
- </template>
- </van-cell>
- <van-checkbox-group v-model="result">
- <van-cell-group>
- <van-cell class="machine-list" v-if="formInfo.length === 0">
- <template #title>
- <div class="f14 warp">
- <div class="vm c333 ml16">暂无预发机</div>
- </div>
- </template>
- </van-cell>
- <van-cell class="machine-list" v-for="item,index in formInfo" clickable :key="item.Id" @click="toggle(index)" center>
- <template #title>
- <div class="f14 warp">
- <div class="vm c333">Sn: {{item.SnNo}}</div>
- <div class="vm c999">来源仓库: {{item.StoreName}}</div>
- </div>
- </template>
- <template #icon>
- <van-checkbox class="mr16" :name="item" ref="checkboxes" checked-color="#FFD500"></van-checkbox>
- </template>
- </van-cell>
- </van-cell-group>
- </van-checkbox-group>
- <van-goods-action class="mall-bottom">
- <van-goods-action-button class="kxs-btn" type="default" color="#FFD500" style="color:#333;" text="确认申请" :disabled="!checked && result.length===0" @click="onClickButton"></van-goods-action-button>
- </van-goods-action>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- Vue.use(vant.Lazyload);
- let app = new Vue({
- el: '#app',
- data(){
- return{
- toptitleisshow,
- checked:false,
- formInfo:[],
- pageinfo:{
- PageSize:10,
- PageNum:1
- },
- result:[],
- }
- },
- watch:{
- checked:function(now,pre){
- if(now === true){
- this.result = []
- }
- }
- },
- created(){
- this.getpreInfo()
- },
- methods:{
- goback(){
- PublicLib.GoBack({Level:1});
- },
- async getpreInfo(){
- let {PageSize,PageNum} = this.pageinfo
- const BrandId = JSON.parse(PublicLib.getCookieInfo('chooseProductId')).Id;
- const ToUserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/pos/presendstockdetail/list?t='+Math.random(6),JSON.stringify({BrandId,ToUserId,PageSize,PageNum}));
- if(res.status !== '1') return tips('初始化失败!')
- this.formInfo = res.data
- },
- toggle(index){
- this.checked = false
- this.$refs.checkboxes[index].toggle();
- //- console.log(i,'result',this.result)
- },
- notUse(){
- this.checked = !this.checked
- },
- onClickButton(){
- PublicLib.putCookieInfo('getSetSnList', JSON.stringify(this.result));
- //- console.log(this.result)
- PublicLib.GoBack({Level:1});
- }
- },
- })
- </script>
- </body>
- </html>
|