123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <!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>.warehouse-application .topline{border-top:1px solid #f2f2f2;}</style>
- </head>
- <body class="pb0 ovh pt0" style="padding-top:0;">
- <div class="warehouse rel warehouse-application" id="app" v-cloak style="height:100vh;background-color: #F6F6F6">
- <van-nav-bar class="user_rank_explan_title user_title_normal titlef16 rightc333" left-arrow title="申请记录" @click-left="goback" v-if="toptitleisshow">
- <template #left><img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <van-pull-refresh class="topline" v-model="refreshing" @refresh="onRefresh" style="height:100%;min-height:10vh;">
- <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="records.length === 0"></van-empty>
- <van-list @load="onLoad" v-model="loading" :finished="finished" finished-text="没有更多数据了" :immediate-check="false" v-if=" records.length !== 0">
- <div class="bgcfff p16" v-for="(item,index) in records" :key="index" @click="toDetail(item)" style="border-bottom:.5px solid #f1f1f1">
- <div class="df jcsb">
- <div class="c333">
- <div class="df jcsb aic">
- <div class="df aic">
- <div class="f14" style="margin-right:.3733rem;">申请时间</div>
- <div class="f14">{{item.CreateDate}}</div>
- </div>
- </div>
- <div class="df aic mt8">
- <div class="f14" style="margin-right:.3733rem;">申请数量</div>
- <div class="f14">{{item.ApplyNum}}台</div>
- </div>
- </div>
- <div class="df aic" :class="item.Status === 1 ? 'c333' : 'c999'">
- <div class="f12">{{statusMap.get(item.Status)}}</div>
- <van-icon name="arrow" v-if="item.Status === 1" style="margin-left:.16rem"></van-icon>
- </div>
- </div>
- </div>
- </van-list>
- </van-pull-refresh>
- </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);
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data(){
- return{
- toptitleisshow,
- loading: false, //是否处于加载状态,加载过程中不触发load事件
- finished: false, //是否已加载完成,加载完成后不再触发load事件
- refreshing: false, //是否处于加载中状态
- active: 0,
- lastactive:0,
- statusMap:new Map([[0, "待配货"], [1, "已发货"],[2,'已驳回']]),
- pageinfo:{
- PageSize:10,
- PageNum:1
- },
- columns:[],
- records:[],
- activeItem:{
- StoreId:'',
- BrandId:'',
- },
- }
- },
- created(){
- //- this.getwarehouselist().then(()=>{
- this.getList()
- //- })
- },
- beforeUpdate(){
- this.$refs.wrapper1.style.height = `${document.documentElement.clientHeight - 44}px`;
- },
- methods:{
- goback(){
- PublicLib.GoBack({Level:1});
- },
- toDetail(item){
- if(item.Status !== 1){return;}
- console.log('item',item)
- //- item.StoreId = this.columns[this.active].StoreId
- //- item.ProductName = this.columns[this.active].ProductName
- PublicLib.putCookieInfo('appication-Id', item.Id);
- PublicLib.Goto({Url:'warehouse-application-record-detail'});
- },
- onRefresh() {
- this.pageinfo.PageNum = 1;
- this.refreshing = true;
- //- this.finished = false;
- //- this.loading = true;
- this.getList();
- this.refreshing = false
- //- this.onLoad();
- },
- //- changetab(){
- //- if(this.lastactive === this.active) return;
- //- this.pageinfo.PageNum = 1;
- //- //- this.finished = false;
- //- this.lastactive = this.active;
- //- this.activeItem.StoreId = this.columns[this.active].StoreId
- //- this.activeItem.BrandId = this.columns[this.active].BrandId
- //- this.getList();
- //- },
- async getList(type = 'refresh'){
- //- const StoreId = this.columns[this.active].StoreId
- //- const BrandId = this.columns[this.active].BrandId
- //- console.log(this.activeItem,'activeItem',this.activeItem.BrandId)
- const UserId = PublicLib.getCookieInfo('userId');
- //- const res = await getRequest('api/v1/storemachineapply/applylist?t='+Math.random(6),JSON.stringify({...this.pageinfo,UserId,...this.activeItem}));
- const res = await getRequest('api/v1/storemachineapply/applylist?t='+Math.random(6),JSON.stringify({...this.pageinfo,UserId}));
- //- if(res.status !== '1') return tips('获取仓库列表失败');
- this.productinfo = res.data;
- if (res.data.length < this.pageinfo.PageSize){this.finished = true;}
- this.refreshing = false;
- this.loading = false;
- if(type === 'refresh'){
- this.records = res.data
- }
- if(type === 'onload'){
- this.records.push(...res.data)
- }
- console.log( this.records)
- },
- onLoad(){
- //- console.log('onload')
- this.pageinfo.PageNum++;
- this.getList('onload')
- },
- //机具类型、品牌查询
- //- async getproducttypelist(){
- //- const res = await getRequest('api/v1/pos/kqproducts/list?t='+Math.random(6),JSON.stringify({PageSize:10,PageNum:1}));
- //- if(res.status !== '1')return tips('产品列表获取失败!');
- //- //- res.data.push({Name: "金控大机", Id: 3},{Name: "开店宝大机", Id: 4});
- //- this.columns = res.data.map(item=> {return {Id:item.Id,text:item.Name}});
- //- },
- async getwarehouselist(){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/storehouse/indexlist?t='+Math.random(6),JSON.stringify({UserId,PageSize:15,PageNum:1}));
- if(res.data.length > 0 && res.status === '1') {
- //- res.data[0].ProductName = '快钱MOS';
- //- res.data[0].LaveNum = '95';
- res.data.map(item=> {
- if(item.ProductName){
- this.columns.push({StoreId:item.Id,text:item.ProductName,BrandId:item.BrandId,ProductName:item.ProductName})
- }
- });
- this.activeItem.StoreId = this.columns[this.active].StoreId
- this.activeItem.BrandId = this.columns[this.active].BrandId
-
- };
- },
- },
- })
- </script>
- </body>
- </html>
|