123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <!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>
- .mall-bottom{padding:0 .3733rem;height:54px;}
- .mall-bottom button{border-radius:999px !important; height:80% !important;}
- </style>
- </head>
- <body class="pt0 pb0" style="padding-top:0;">
- <div class="warehouse rel h100p" id="app" v-cloak>
- <van-nav-bar class="user_rank_explan_title user_title_normal titlef16 rightc333" left-arrow :title="title" v-if="toptitleisshow" @click-left="goback">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <van-notice-bar wrapable color="#eea75b" :scrollable="false" text="请仔细与包装盒或者整箱机具的SN号进行对比,确认无误再划拨"></van-notice-bar>
- <div class="van-tabs__content pl16 pr16 mt16">
- <div class="userinfopanel df panel">
- <div class="info f14 c333" id="copyob">
- <div class="item">{{userinfo.ProductName}}:<span class="ml4">{{userinfo.BuyCount}}台 </span></div>
- <div class="item">{{userinfo.CreateDate}}</div>
- <div class="item">{{userinfo.RealName}}<span class="ml4">{{userinfo.Mobile}}</span></div>
- <div class="item">{{userinfo.Areas}}{{userinfo.Address}}</div>
- <div class="item">提货方式:<span class="ml4 spcolor">{{userinfo.DeliveryType}}</span></div>
- </div>
- <div class="copy tc f14" :data-clipboard-text="userinfo.RealName +' '+ userinfo.Mobile + ' ' + userinfo.Areas+userinfo.Address" data-clipboard-action="copy" ref="copy" @click="copyinfo" @mouseenter="copyinfo">
- <div>复制收件信息 </div>
- <div>(姓名、电话、信息)</div>
- </div>
- </div>
- <div class="option df f14 top_line">
- <div class="c333">划拨方式</div>
- <button class="bgcfff" @click="transfer('逐台划拨')">逐台划拨</button>
- <button class="bgcfff" @click="transfer('整箱划拨')">整箱划拨</button>
- </div>
- <div class="snlist f16">
- <div class="undatatips tc c999" v-if="snlist.length === 0">暂无SN数据</div>
- <van-cell-group>
- <van-cell v-for="(item, index) in snlist" :key="item.Id" clickable :title="`SN码: ${item.PosSn}`"></van-cell>
- </van-cell-group>
- </div>
- </div>
- <van-goods-action class="mall-bottom">
- <van-goods-action-button class="kxs-btn" type="default" color="#FFD500" text="划拨" @click="posttransfer"></van-goods-action-button>
- </van-goods-action>
- </div>
- <script src="./static/js/clipboard.min.js"></script>
- <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>
- function OnStart(){
- app.onstartfn();
- };
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow:false,
- title:'',
- active: 1,
- //- 下拉刷新
- loading: false,
- finished: false,
- refreshing: false,
- show:false,
- preView:false,
- preViewUrl:'',
- userinfo:{},
- snlist: [
- ],
- };
- },
- async created() {
- this.title = PublicLib.getCookieInfo('warehouseName');
- this.toptitleisshow = toptitleisshow;
- this.getorderdetail();
- PublicLib.SetTitle({Title:PublicLib.getCookieInfo('warehouseName')});
- this.onstartfn();
- },
- methods: {
- async onstartfn(){
- if(PublicLib.getCookieInfo('transferType') === '逐台划拨' && PublicLib.getCookieInfo('warehouseisback') === 'true'){
- PublicLib.putCookieInfo('warehouseisback', '');
- this.snlist = JSON.parse(PublicLib.getCookieInfo('warehouseSnList'));
- }else if(PublicLib.getCookieInfo('transferType') === '整箱划拨' && PublicLib.getCookieInfo('warehouseisback') === 'true'){
- PublicLib.putCookieInfo('warehouseisback', '');
- this.snlist = JSON.parse(PublicLib.getCookieInfo('warehouseSnList'));
- };
- const num = this.userinfo.BuyCount;
- this.snlist.splice( num , this.snlist.length - num);
- PublicLib.putCookieInfo('warehouseSnList', JSON.stringify([]));
- },
- giveToast(str){
- vant.Toast(str);
- },
- copyinfo(){
- const that = this;
- const clipboard = new ClipboardJS(this.$refs.copy);
- clipboard.on('success', function(e) {
- that.giveToast('复制成功');
- });
- clipboard.on('error', function(e) {
- that.giveToast('复制失败,请手动选择复制!');
- });
- },
- async getorderdetail(){
- //- PublicLib.ShowLoading({Message:''});
- const Id = PublicLib.getCookieInfo('orderId');
- const res = await getRequest('api/v1/orders/storeorderdetail?t='+Math.random(6),JSON.stringify({Id}));
- if(res.status !== '1') return tips('获取订单详情失败');
- //- PublicLib.HideLoading();
- this.userinfo = res.data;
- },
- preview(url){
- this.preViewUrl = url
- this.preView = true
- },
- goback(){
- PublicLib.GoBack({Level:1});
- },
- //- 跳转划拨搜索
- transfer(type){
- PublicLib.putCookieInfo('transferType', type);
- PublicLib.Goto({Url:'warehouse-deliver-transfer'});
- },
- snnolist(){
- return this.snlist.map(item=>item.Id).join(',');
- },
- backOrder(){
- this.show = true
- },
- //- 划拨
- async posttransfer(){
- if(this.snlist.length === 0) return tips('请先选择划拨SN号!');
- if(this.snlist.length !== Number(this.userinfo.BuyCount)) return tips('请选择订单数量SN号进行划拨!');
- const StoreId = PublicLib.getCookieInfo('warehouseId');
- const OrderId = PublicLib.getCookieInfo('orderId');
- let res = null;
- switch(PublicLib.getCookieInfo('transferType')) {
- case '逐台划拨':
- res = await postRequest('api/v1/storestockchange/transferone?t='+Math.random(6),JSON.stringify({ToUserId:this.userinfo.UserId,StoreId,SnIds:this.snnolist(),OrderId}));
- break;
- case '整箱划拨':
- res = await postRequest('api/v1/storestockchange/transferwhole?t='+Math.random(6),JSON.stringify({ToUserId:this.userinfo.UserId,StoreId,SnNo:this.snnolist(),OrderId}));
- break;
- };
- if(res.status !== '1') return tips('机具划拨失败,请重试!');
- tips('机具划拨成功');
- this.snlist = [];
- setTimeout(()=>{
- PublicLib.GoBack({Level:1});
- },2000)
- },
-
-
- }
- });
- </script>
- </body>
- </html>
|