skyouc
3 天以前 e97cbb592d9165b808a76f654fa0a467817ddedf
Merge branch 'devlop' of http://47.97.1.152:5880/r/pda-master into devlop
8个文件已修改
14个文件已添加
1179 ■■■■■ 已修改文件
App.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/request.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
locale/en.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
locale/zh-Hans.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/index.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/index.vue 415 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/outbound/fastPicking.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/outbound/wavePick.vue 286 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/outbound/wavePickItem.vue 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/family/HarmonyOS_Sans_SC_Black.ttf 补丁 | 查看 | 原始文档 | blame | 历史
static/family/HarmonyOS_Sans_SC_Bold.ttf 补丁 | 查看 | 原始文档 | blame | 历史
static/family/HarmonyOS_Sans_SC_Light.ttf 补丁 | 查看 | 原始文档 | blame | 历史
static/family/HarmonyOS_Sans_SC_Regular.ttf 补丁 | 查看 | 原始文档 | blame | 历史
static/img/login_backg.png 补丁 | 查看 | 原始文档 | blame | 历史
static/img/login_eye.png 补丁 | 查看 | 原始文档 | blame | 历史
static/img/login_noteye.png 补丁 | 查看 | 原始文档 | blame | 历史
static/img/login_text.png 补丁 | 查看 | 原始文档 | blame | 历史
static/img/login_top.png 补丁 | 查看 | 原始文档 | blame | 历史
App.vue
@@ -115,6 +115,9 @@
    @import "colorui/icon.css";
    @import "static/css/wms.css/wms.css";
    @import "static/css/common.scss";
    @import "static/family/HarmonyOS_Sans_SC_Bold.ttf"
    /*每个页面公共css */
    body {
@@ -122,7 +125,26 @@
        color: #606266;
        font-family: Helvetica Neue, Helvetica, sans-serif;
    }
    @font-face {
        font-family: a1;
        src: url('static/family/HarmonyOS_Sans_SC_Bold.ttf') format('truetype');
    }
    @font-face {
        font-family: a2;
        src: url('static/family/HarmonyOS_Sans_SC_Black.ttf') format('truetype');
    }
    @font-face {
        font-family: a3;
        src: url('static/family/HarmonyOS_Sans_SC_Light.ttf') format('truetype');
    }
    @font-face {
        font-family: a4;
        src: url('static/family/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
    }
    .nav-list {
        display: flex;
        flex-wrap: wrap;
common/request.js
@@ -15,8 +15,8 @@
    return new Promise((resolve, reject) => {
        const token = uni.getStorageSync('token');
        // const URL = 'http://47.76.147.249:8080/rsf-server/pda' + url;
        const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
        // const URL = 'http://127.0.0.1:8080/rsf-server/pda' + url;
        // const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
        const URL = 'http://192.168.4.50:8080/rsf-server/pda' + url;
        uni.request({
            url: URL,
            data: postData,
locale/en.json
@@ -11,8 +11,8 @@
  "login":{
      "login": "login",
      "loging": "loging",
      "user": "user",
      "pwd": "pwd",
      "user": "username",
      "pwd": "password",
      "inputUser": "Please enter your account",
      "inputPwd":"Please enter your password",
    "remPwd":"remember password"
@@ -30,7 +30,11 @@
    "stationUnbinding":"Station Unbinding",
    "bindAndInbound":"Binding And Inbound",
    "quickPicking":"Quick Picking",
    "outLogin":"Login Out"
    "wavePick":"Wave Picking",
    "outLogin":"Login Out",
    "language-change-confirm":"chenge",
    "hello":"Hello, welcome to log in to the WMS system!",
    "intro":"Make manufacturing and logistics more efficient"
      
      
  },
locale/zh-Hans.json
@@ -31,7 +31,11 @@
        "stationUnbinding":"站点解绑",
        "bindAndInbound":"绑定&入库",
        "quickPicking":"快速拣货",
        "outLogin":"退出登录"
        "wavePick":"波次拣货",
        "outLogin":"退出登录",
        "language-change-confirm":"确定切换?",
        "hello":"您好,欢迎登录WMS系统!",
        "intro":"让制造与物流更高效"
        
        
    },
manifest.json
@@ -1,9 +1,9 @@
{
    "name" : "%app.name%",
    "name" : "中扬wms",
    "appid" : "__UNI__DA5854D",
    "description" : "",
    "versionName" : "20250225A",
    "versionCode" : 146,
    "versionName" : "20250613",
    "versionCode" : 100,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
package-lock.json
New file
@@ -0,0 +1,19 @@
{
  "name": "pda-master",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "dependencies": {
        "vue-i18n": "^8.2.1"
      }
    },
    "node_modules/vue-i18n": {
      "version": "8.28.2",
      "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz",
      "integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==",
      "deprecated": "Vue I18n v8.x has reached EOL and is no longer actively maintained. About maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html",
      "license": "MIT"
    }
  }
}
package.json
New file
@@ -0,0 +1,5 @@
{
  "dependencies": {
    "vue-i18n": "^8.2.1"
  }
}
pages.json
@@ -1,7 +1,7 @@
{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/login/login",
            "path": "pages/login/index",
            "style": {
                "navigationBarTitleText": "%page.login%"
            }
@@ -13,6 +13,18 @@
            }
        },
        {
            "path": "pages/outbound/wavePick",
            "style": {
                "navigationBarTitleText": "波次拣货"
            }
        },
        {
            "path": "pages/outbound/wavePickItem",
            "style": {
                "navigationBarTitleText": "波次拣货"
            }
        },
        {
            "path": "pages/rece/standard",
            "style": {
                "navigationBarTitleText": "标准收货"
pages/home/index.vue
@@ -145,6 +145,13 @@
                    <text>{{$t('index.quickPicking')}}</text>
                </navigator>
            </view>
            <view class="cu-item">
                <navigator hover-class='none' url="/pages/outbound/wavePickItem" navigateTo>
                    <view class="cuIcon-apps text-blue">
                    </view>
                    <text>{{$t('index.wavePick')}}</text>
                </navigator>
            </view>
        </view>
@@ -179,7 +186,7 @@
                setTimeout(() => {
                    uni.removeStorageSync('token');
                    uni.reLaunch({
                        url: "/pages/login/login"
                        url: "/pages/login/index"
                    });
                }, 1000);
            }
pages/login/index.vue
New file
@@ -0,0 +1,415 @@
<template>
    <view class="bodyView">
        <view class="topView">
            <image src="/static/img/login_top.png" mode="aspectFill">
            </image>
        </view>
        <view class="logoView">
            <image src="/static/img/newLogo.png" mode="aspectFit">
            </image>
        </view>
        <view class="bottomView">
            <view class="itemView" style="margin-bottom: 40px;">
                <view class="helloText">{{$t('index.hello')}}</view>
                <view class="introText">{{$t('index.intro')}}</view>
            </view>
            <view class="itemView">
                <view class="textType3">{{$t('login.user')}}:</view>
                <view class="input-wrapper">
                    <input class="uni-input" v-model="user.userName" focus :placeholder="$t('login.inputUser')" />
                </view>
            </view>
            <view class="itemView">
                <view class="textType3">{{$t('login.pwd')}}:</view>
                <view class="input-wrapper">
                    <input class="uni-input" v-model="user.password" :placeholder="$t('login.inputPwd')" :password="!showPassword" />
                    <image src="/static/img/login_noteye.png" class="eye-icon" v-if="showPassword"
                        @click="changePassword"></image>
                    <image src="/static/img/login_eye.png" class="eye-icon" v-if="!showPassword"
                        @click="changePassword"></image>
                </view>
            </view>
            <view class="langAndRemView">
                <view class="check">
                    <view >
                        <view>{{$t('login.remPwd')}}</view>
                    </view>
                    <view>
                        <switch :checked='remberPassword' color="#FFCC33" style="transform:scale(0.7)" @change="remberChange" />
                    </view>
                </view>
                <view class="langView">
                    <!-- 语言选择下拉菜单 -->
                    <view class="language-dropdown">
                        <view class="selected-language" @click="toggleLanguageDropdown">
                            <text>{{getCurrentLanguageText()}}</text>
                            <uni-icons type="bottom" size="14" color="#707070"></uni-icons>
                        </view>
                        <view class="language-options" v-if="showLanguageDropdown">
                            <view class="language-option" v-for="(item, index) in locales" :key="index" @click="onLocaleChange(item)">
                                <text>{{item.text}}</text>
                                <uni-icons type="checkmarkempty" size="14" color="#007AFF" v-if="item.code == applicationLocale"></uni-icons>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
            <view class="itemView">
                <button class="loadingButton" @click="onLogin()"  :loading="loading">{{btnText}}</button>
            </view>
        </view>
    </view>
</template>
<script>
    import md5 from '../../static/js/md5.js'
    import {
        request
    } from '../../common/request.js'
export default{
    data(){
        return{
            showPassword: false,
            loading: false,
            showLanguageDropdown: false,
            loginButton: 'login.login',
            systemLocale: '',
            applicationLocale: '',
            remberPassword: true,
            user: {
                userName: '',
                password: '',
            },
        }
    },
    computed:{
      locales() {
        return [{
            text: this.$t('locale.auto'),
            code: 'auto'
          }, {
            text: this.$t('locale.en'),
            code: 'en'
          },
          {
            text: this.$t('locale.zh-hans'),
            code: 'zh-Hans'
          },
          {
            text: this.$t('locale.zh-hant'),
            code: 'zh-Hant'
          },
          {
            text: this.$t('locale.ja'),
            code: 'ja'
          }
        ]
      },
      btnText() {
              return this.$t(this.loginButton);
        }
    },
    onLoad(){
        let systemInfo = uni.getSystemInfoSync();
        this.systemLocale = systemInfo.language;
        this.applicationLocale = uni.getLocale();
        this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
        uni.onLocaleChange((e) => {
          this.applicationLocale = e.locale;
        })
        this.user = uni.getStorageSync('user')
        if (!this.user) {
            this.user = {
                userName: '',
                password: ''
            }
        }
    },
    methods:{
        async onLogin() {
            const {
                code,
                data,
                msg
            } = await request('/login', {
                username: this.user.userName,
                password: this.user.password,
            })
            if (code === 200) {
                this.loading = true;
                this.loginButton = 'login.loging';
                uni.setStorageSync('token', data.accessToken);
                uni.setStorageSync('userData', data.user);
                if (this.remberPassword) {
                    uni.setStorageSync('user', this.user);
                } else {
                    uni.removeStorageSync('user');
                }
                this.goHome()
            } else {
                uni.showToast({
                    title: msg
                })
            }
        },
        goHome() {
            setTimeout(() => {
                // this.getAuth2()
                this.getFields()
                uni.showToast({
                    title: '登录成功'
                })
                setTimeout(() => {
                    uni.reLaunch({
                        url: '../home/index'
                    });
                }, 300)
            }, 700)
        },
        async getFields() {
            const {
                code,
                data,
                msg
            } = await request('/dynamic/fields', {}, 'get')
            if (code === 200) {
                this.$store.commit('user/setFields', data)
            } else {
                uni.showToast({
                    title: msg
                })
            }
        },
        remberChange(e) {
            this.remberPassword = !this.remberPassword
        },
        // 显示/隐藏密码
        changePassword() {
            this.showPassword = !this.showPassword;
        },
        localChange() {
            console.log(this.local)
          if (this.isAndroid) {
            uni.showModal({
              content: this.$t('index.language-change-confirm'),
              success: (res) => {
                if (res.confirm) {
                  uni.setLocale(this.local.value);
                }
              }
            })
          } else {
            uni.setLocale(this.local.value);
            this.$i18n.locale = this.local.value;
          }
        },
        // 切换语言下拉菜单显示状态
        toggleLanguageDropdown() {
            this.showLanguageDropdown = !this.showLanguageDropdown;
        },
        // 获取当前选择的语言文本
        getCurrentLanguageText() {
            const currentLocale = this.locales.find(item => item.code === this.applicationLocale);
            return currentLocale ? currentLocale.text : this.$t('locale.auto');
        },
        // 语言选择改变
        onLocaleChange(e) {
            if (this.isAndroid) {
                uni.showModal({
                    content: this.$t('index.language-change-confirm'),
                    success: (res) => {
                        if (res.confirm) {
                            uni.setLocale(e.code);
                            this.showLanguageDropdown = false;
                        }
                    }
                })
            } else {
                uni.setLocale(e.code);
                this.$i18n.locale = e.code;
                this.showLanguageDropdown = false;
            }
        },
    }
}
</script>
<style>
    .helloText{
        font-family: a2;
        font-size: 20px;
        margin-top: 10px;
        margin-bottom: 5px;
    }
    .introText{
        font-family: a3;
        font-size: 15px;
        color: #ababab;
    }
    .textType3{
        font-family: a4;
    }
    .bodyView{
        display: flex;
        flex-direction: column;
        background-image: url("/static/img/login_backg.png");
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        height: 100vh;
        width: 100%;
    }
    .topView{
        flex: 7;
    }
    .topView image{
        width: 100%;
    }
    .logoView{
        flex: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    .logoView image{
        width: 33%;
        height: 50px;
        margin-right: 20px;
    }
    .bottomView{
        flex: 15;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }
    .itemView{
        width: 90%;
        height: 50px;
        margin-bottom: 30px;
    }
    .langAndRemView{
        width: 90%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .langView{
        width: 30%;
    }
    .textImage{
        width: 60%;
        height: 42px;
        object-fit: cover;
        margin-top: 20px;
        margin-bottom: 30px;
    }
    .input-wrapper {
        /* #ifndef APP-NVUE */
        display: flex;
        /* #endif */
        padding: 8px 13px;
        flex-direction: row;
        flex-wrap: nowrap;
        background-color: #FFFFFF;
        border-radius: 10px;
        height: 45px;
        align-items: center;
        margin-top: 5px;
    }
    .uni-input {
        height: 28px;
        line-height: 28px;
        font-size: 15px;
        padding: 0px;
        flex: 1;
        background-color: #FFFFFF;
    }
    .uni-icon {
        font-family: uniicons;
        font-size: 24px;
        font-weight: normal;
        font-style: normal;
        width: 24px;
        height: 24px;
        line-height: 24px;
        color: #999999;
    }
    .uni-eye-active {
        color: #007AFF;
    }
    .eye-icon {
        width: 20px;
        height: 13px;
        margin-left: 5px;
    }
    .loadingButton{
        background-color: #ffda1e;
        font-family: a1;
    }
    .check {
        height: 100%;
        display: flex;
        font-size: 18px;
        color: #606266;
        justify-content: flex-start;
        align-items: center;
    }
    /* 语言选择下拉菜单 */
    .language-dropdown {
        position: relative;
        margin-bottom: 20rpx;
        z-index: 10;
    }
    .selected-language {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15rpx 20rpx;
        background-color: #f8f8f8;
        border-radius: 8rpx;
        border: 1px solid #e0e0e0;
    }
    .language-options {
        position: absolute;
        bottom: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        border-radius: 8rpx;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
        margin-bottom: 5rpx;
    }
    .language-option {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15rpx 20rpx;
        border-bottom: 1px solid #f0f0f0;
    }
    .language-option:last-child {
        border-bottom: none;
    }
    .language-option:active {
        background-color: #f5f5f5;
    }
</style>
pages/outbound/fastPicking.vue
@@ -2,22 +2,23 @@
    <view class="has-foot">
        <form>
            <view class="cu-form-group" v-show="!isconfirm">
                <view class="title">容器/库位码</view>
                <input placeholder="请扫描容器/库位码" v-model="barcode" @input="search()" focus></input>
                <view class="title">容器码</view>
                <input placeholder="请扫描容器码" v-model="barcode"  focus></input>
                <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
                <text class='cuIcon-search text-blue' @click="search"></text>
            </view>
        </form>
        <view class="cu-form-group" v-show="isClickItem">
        <!-- <view class="cu-form-group" v-show="isClickItem">
            <view class="title">QR码</view>
            <input placeholder="请扫描QR码" v-model="QRbarcode" ></input>
            
        </view>
        </view> -->
                
        <view class="cu-list det menu sm-border  padding">
            <block  v-for="(item, index) in list" :key="index">
                <view :style="clickItem === index ?itemStyle : {}" class="cu-list det menu  "  @click="clickTaskItem(index)">
                <view :style="clickItem === index ?itemStyle : {}" class="cu-list det menu  " >
                    
                
                <view class="cu-bar bg-white solid-bottom margin-top-sm">
@@ -32,15 +33,10 @@
                    <view class="content">
                        <text class="text-gray">编码:<text class="text-black ">{{item.matnrCode}}</text></text>
                    </view>                    
                </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">订单:<text class="text-black ">{{item.trackCode}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">出库单:<text class="text-black ">{{item.trackCode}}</text></text>
                        <text class="text-gray">出库单:<text class="text-black ">{{item.sourceCode}}</text></text>
                    </view>                    
                </view>
                <view class="cu-item">
@@ -52,21 +48,12 @@
                    <view class="content">
                        <text class="text-gray">库存单位:<text class="text-black ">{{item.unit}}</text></text>
                    </view>    
                    <view class="content">
                        <text class="text-gray">质检结论:<text class="text-black ">{{item.matnrCode}}</text></text>
                    </view>
                </view>                
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">标签:<text class="text-black ">{{item.matnrCode}}</text></text>
                    </view>
                </view>
                
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">存储数量:<text class="text-black ">{{item.matnrCode}}</text></text>
                    </view>
                    <view class="content">
                        <text class="text-gray">计划分拣数量:<text class="text-black ">{{item.anfme}}</text></text>
                    </view>                        
@@ -74,7 +61,7 @@
                <view class="cu-item">                        
                    <view class="content2">
                        <text class="text-gray">本次分拣数量:</text>
                        <input type="number" v-model="item.workQty"></input>
                        <input type="number" v-model="item.anfme" disabled=""></input>
                    </view>
                        
                </view>    
@@ -83,25 +70,16 @@
        </view>
        <view class="text-blue text-right padding-lr" v-show="isconfirm">
            本次收货总数量:{{allCount}}
        </view>
        <view class="cu-form-group " v-show="isconfirm">
            <view class="title">收货区</view>
            <uni-data-select v-model="whAreaId" :localdata="range" placement="top"
                @change="selChange"></uni-data-select>
        </view>
        <view class="cu-bar btn-group foot" v-show="!isconfirm">
        <view class="cu-bar btn-group foot" >
            <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
            <button class="cu-btn bg-blue shadow-blur" @click="next">下一步</button>
            <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">提交确认</button>
        </view>
        <view class="cu-bar btn-group foot" v-show="isconfirm">
            <button class="cu-btn text-blue line-blue shadow" @click="prev">上一步</button>
            <button class="cu-btn bg-blue shadow-blur" @click="confirm">提交收货</button>
        </view>
    </view>
</template>
@@ -131,6 +109,7 @@
                        backgroundColor: '#42b983',                        
                        borderColor: '#42b983'
                },
                repeatClick: false
            }
        },
        computed: {
@@ -192,6 +171,52 @@
            },
            async complete() {
                let that = this
                if(that.barcode === '' || that.barcode === null){
                    uni.showToast({
                        title: "容器号为空",
                        icon: "error",
                    })
                    return ;
                }
                if(that.list === [] || that.list.length === 0){
                    uni.showToast({
                        title: "拣货明细为空",
                        icon: "error",
                    })
                    return ;
                }
                that.repeatClick = true
                const {
                    code,
                    data,
                    msg
                } = await request('/saveOutTaskSts/'+that.barcode,{}, 'get')
                if (code === 200) {
                    uni.showToast({
                        title: msg,
                        icon: "success"
                    })
                    that.clear()
                }else if(code == 401){
                    setTimeout(() => {
                        uni.removeStorageSync('token');
                        uni.reLaunch({
                            url: "/pages/login/login"
                        });
                    }, 1000);
                }else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                        position: 'top'
                    })
                }
            that.repeatClick = false
            },
            clearCode() {
                this.barcode = ''
            },
pages/outbound/wavePick.vue
New file
@@ -0,0 +1,286 @@
<template>
    <view class="has-foot">
        <form>
            <view class="cu-form-group" v-show="!isconfirm">
                <view class="title">波次号</view>
                <input placeholder="请扫描波次号" v-model="barcode" @input="search()" focus></input>
                <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
            </view>
        </form>
        <view class="cu-list det menu sm-border  padding">
            <block  v-for="(item, index) in list" :key="index">
                <view  class="cu-list det menu  "  @click="clickTaskItem(index)">
                <view class="cu-bar bg-white solid-bottom margin-top-sm">
                    <view class="action">
                        <view class="index">
                            {{index+1}}
                        </view>
                    </view>
                    <view class="content2">
                        <text class="text-gray"><text class="text-black ">{{item.exceStatus$}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">波次号:<text class="text-black ">{{item.code}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">创建时间:<text class="text-black ">{{item.createTime$}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">订单数:<text class="text-black ">{{item.orderNum}}</text></text>
                    </view>
                    <view class="content">
                        <text class="text-gray">品类数量:<text class="text-black ">{{item.groupQty}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">总数量:<text class="text-black ">{{item.anfme}}</text></text>
                    </view>
                    <view class="content">
                        <text class="text-gray">策略:<text class="text-black ">{{item.matnrCode}}</text></text>
                    </view>
                </view>
                </view>
            </block>
        </view>
        <view class="text-blue text-right padding-lr" v-show="isconfirm">
            本次收货总数量:{{allCount}}
        </view>
        <view class="cu-form-group " v-show="isconfirm">
            <view class="title">收货区</view>
            <uni-data-select v-model="whAreaId" :localdata="range" placement="top"
                @change="selChange"></uni-data-select>
        </view>
        <view class="cu-bar btn-group foot" v-show="!isconfirm">
            <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
            <button class="cu-btn bg-blue shadow-blur" @click="next">下一步</button>
        </view>
        <view class="cu-bar btn-group foot" v-show="isconfirm">
            <button class="cu-btn text-blue line-blue shadow" @click="prev">上一步</button>
            <button class="cu-btn bg-blue shadow-blur" @click="confirm">提交收货</button>
        </view>
    </view>
</template>
<script>
    import {
        request
    } from '../../common/request.js'
    import {
        mapState,
        mapMutations,
        mapActions,
        mapGetters
    } from 'vuex';
    export default {
        data() {
            return {
                isClickItem:false,
                clickItem:'',
                QRbarcode:null,
                barcode: '',
                whAreaId: '',
                list: [],
                range: [],
                isconfirm: false,
                itemStyle: {
                        backgroundColor: '#42b983',
                        borderColor: '#42b983'
                },
            }
        },
        computed: {
            ...mapState('user', ['dynamicFields']),
            allCount() {
                return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
            }
        },
        mounted() {
            this.search()
        },
        methods: {
            clickTaskItem(index){
                let that = this
                uni.navigateTo({
                    url: "./wavePickItem",
                    // 通过eventChannel向被打开页面传送数据
                    success: function(res) {
                        res.eventChannel.emit('waveItem', {
                            data: that.list[index]
                        })
                    }
                });
            },
            typeChange(e){
                this.typeSelect = e.value
                this.search()
            },
            async search() {
                this.list = []
                // if(this.barcode === '' || this.barcode ===null){
                //     return ;
                // }
                const {
                    code,
                    data,
                    msg
                } = await request('/getWaveList',{
                    barcode:this.barcode
                }
                )
                if (code === 200) {
                    if (Object.keys(data).length === 0){
                        uni.showToast({
                            title: "未查询到波次数据",
                            icon: "none",
                            position: 'top'
                        })
                    }
                    this.list.push(...data)
                }else if(code == 401){
                    setTimeout(() => {
                        uni.removeStorageSync('token');
                        uni.reLaunch({
                            url: "/pages/login/login"
                        });
                    }, 1000);
                }else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                        position: 'top'
                    })
                }
            },
            clearCode() {
                this.barcode = ''
            },
            remove(index) {
                this.list.splice(index, 1);
            },
            clear() {
                this.list = []
                this.barcode = ''
            },
            next() {
                if (this.list.length) {
                    this.isconfirm = true
                } else {
                    uni.showToast({
                        icon: "none",
                        title: '未选物料标签'
                    })
                }
            },
            prev() {
                this.isconfirm = false
            },
            selChange(val) {
                uni.setStorageSync('whAreaId', val)
            },
            async confirm() {
                const newArr = this.list.map(item => {
                    return {
                        ...item,
                        receiptQty: item.receiptQty === null ? 0 : +item.receiptQty
                    };
                });
                if (this.whAreaId === '') {
                    uni.showToast({
                        icon: "none",
                        title: '请选择收货区'
                    })
                } else {
                    const {
                        code,
                        data,
                        msg
                    } = await request('/orders/confirm', {
                        receipts: newArr,
                        whAreaId: this.whAreaId
                    })
                    if (code === 200) {
                        uni.showToast({
                            title: '收货成功'
                        })
                        this.list = []
                        this.barcode = ''
                        this.isconfirm = false
                    } else {
                        uni.showToast({
                            title: msg,
                            icon: "none",
                            position: 'top'
                        })
                    }
                }
            },
            DateChange(e, item) {
                item.prodTime = e.detail.value
            }
        }
    }
</script>
<style>
    .index {
        border: 1px solid #e54d42;
        color: #e54d42;
        border-radius: 50%;
        display: block;
        width: 50rpx;
        height: 50rpx;
        line-height: 48rpx;
        text-align: center;
        margin-right: 20rpx;
        font-size: 30rpx;
    }
    .text-blue {
        color: #0081ff !important;
    }
    .item {
        position: relative;
        display: flex;
        min-height: 80upx;
        align-items: center;
    }
    .content2 {
        /* background-color: coral; */
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        margin-right: 10px;
        color: #0081ff;
    }
</style>
pages/outbound/wavePickItem.vue
New file
@@ -0,0 +1,278 @@
<template>
    <view class="has-foot">
        <form>
            <!-- <view class="cu-form-group" v-show="!isconfirm">
                <view class="title">波次号</view>
                <text class="text-black ">{{wave.code}}</text>
            </view> -->
            <view class="cu-form-group" v-show="!isconfirm">
                <view class="title">容器号</view>
                <input placeholder="请扫描容器号" v-model="barcode"  focus></input>
                <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
                <text class='cuIcon-search text-blue' @click="search"></text>
            </view>
        </form>
        <view class="cu-list det menu sm-border  padding">
            <block  v-for="(item, index) in list">
                <view  class="cu-list det menu  ">
                <view class="cu-bar bg-white solid-bottom margin-top-sm">
                    <view class="action">
                        <view class="index">
                            {{index+1}}
                        </view>
                    </view>
                    <view class="content2">
                        <text class="text-gray"><text class="text-black ">{{item.exceStatus$}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">物料编码:<text class="text-black ">{{item.taskItem.matnrCode}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">物料名称:<text class="text-black ">{{item.taskItem.maktx}}</text></text>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">总数量:<text class="text-black ">{{item.taskItem.anfme}}</text></text>
                    </view>
                </view>
                </view>
                <view  class="cu-list det menu noMargin " v-for="(item2,index2) in item.asnOrderItems">
                    <view class="cu-item">
                        <view class="content">
                            <text class="text-gray">{{index2+1}}.</text>
                        </view>
                    </view>
                    <view class="cu-item">
                        <view class="content">
                            <text class="text-gray">订单号:<text class="text-black ">{{item2.asnCode}}</text></text>
                        </view>
                    </view>
                    <view class="cu-item">
                        <view class="content">
                            <text class="text-gray">需求数量:<text class="text-black ">{{item2.anfme}}</text></text>
                        </view>
                    </view>
                    <view class="cu-item">
                        <view class="content">
                            <text class="text-gray">已拣数量:<text class="text-black ">{{item2.qty}}</text></text>
                        </view>
                    </view>
                    <view class="cu-item" v-show="item2.anfme !== item2.qty">
                        <view class="content">
                            <view class="cu-form-group padding-lr-0">
                                <view class="title text-blue"><text
                                        class="text-red text-xl vertical-middle">*</text>拣:</view>
                                <uni-number-box style="width: 70%;" :max="max" v-model="item2.demandQty"
                                    :step='1' ></uni-number-box>
                            </view>
                        </view>
                    </view>
                </view>
                <view class="cu-item">
                    <view class="content">
                        <text class="text-gray">本次拣货数量:<text class="text-black ">{{item.asnOrderItems.reduce((total, item) => total + (Number(item.demandQty) ||0 ) , 0)}}</text></text>
                    </view>
                </view>
            </block>
        </view>
        <view class="cu-bar btn-group foot" v-show="!isconfirm">
            <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button>
            <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">拣货完成</button>
        </view>
    </view>
</template>
<script>
    import {
        request
    } from '../../common/request.js'
    import {
        mapState,
        mapMutations,
        mapActions,
        mapGetters
    } from 'vuex';
    export default {
        data() {
            return {
                wave:'',
                list: [],
                isconfirm: false,
                barcode:'',
                max: 99999999,
                repeatClick:false
            }
        },
        computed: {
            allCount() {
                return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
            },
        },
        mounted() {
        },
        onLoad() {
            let that = this
            const eventChannel = this.getOpenerEventChannel();
            eventChannel.on('waveItem', function(data) {
                that.wave = data.data
            })
        },
        methods: {
            clear() {
                this.barcode = ''
                this.list = []
            },
            clearCode() {
                this.barcode = ''
            },
            async search() {
                this.list = []
                // if(this.barcode === '' || this.barcode ===null){
                //     return ;
                // }
                const {
                    code,
                    data,
                    msg
                } = await request('/getContainerWaveList',{
                    barcode:this.barcode
                }
                )
                if (code === 200) {
                    if (Object.keys(data).length === 0){
                        uni.showToast({
                            title: "该标签未查询到数据",
                            icon: "none",
                            position: 'top'
                        })
                    }
                    this.list.push(...data)
                }else if(code == 401){
                    setTimeout(() => {
                        uni.removeStorageSync('token');
                        uni.reLaunch({
                            url: "/pages/login/login"
                        });
                    }, 1000);
                }else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                        position: 'top'
                    })
                }
            },
            async complete() {
                let that = this
                if(that.barcode === '' || that.barcode === null){
                    uni.showToast({
                        title: "容器号为空",
                        icon: "error",
                    })
                    return ;
                }
                if(that.list === [] || that.list.length === 0){
                    uni.showToast({
                        title: "拣货明细为空",
                        icon: "error",
                    })
                    return ;
                }
                this.repeatClick = true
                const {
                    code,
                    data,
                    msg
                } = await request('/saveWavePick',{
                    container:that.barcode,
                    containerWaveDtos:that.list
                })
                if (code === 200) {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                    })
                    that.clear()
                } else {
                    uni.showToast({
                        title: msg,
                        icon: "none",
                    })
                }
                this.repeatClick = false
            },
        }
    }
</script>
<style>
    .index {
        border: 1px solid #e54d42;
        color: #e54d42;
        border-radius: 50%;
        display: block;
        width: 50rpx;
        height: 50rpx;
        line-height: 48rpx;
        text-align: center;
        margin-right: 20rpx;
        font-size: 30rpx;
    }
    .text-blue {
        color: #0081ff !important;
    }
    .item {
        position: relative;
        display: flex;
        min-height: 80upx;
        align-items: center;
    }
    .content2 {
        /* background-color: coral; */
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        margin-right: 10px;
        color: #0081ff;
    }
    .noMargin{
        margin-top: 0px;
        padding: 5px;
    }
</style>
static/family/HarmonyOS_Sans_SC_Black.ttf
Binary files differ
static/family/HarmonyOS_Sans_SC_Bold.ttf
Binary files differ
static/family/HarmonyOS_Sans_SC_Light.ttf
Binary files differ
static/family/HarmonyOS_Sans_SC_Regular.ttf
Binary files differ
static/img/login_backg.png
static/img/login_eye.png
static/img/login_noteye.png
static/img/login_text.png
static/img/login_top.png