skyouc
2 天以前 877cd9465f3214064f78f6163cf07ec745991ef7
no message
1个文件已修改
61 ■■■■■ 已修改文件
pages/AGV/CacheInCall.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/AGV/CacheInCall.vue
@@ -1,18 +1,19 @@
<template>
    <view>
        <view class="code">
        <view class="code">
            <view class="item">
                <view class="code-decs">入库站点:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="orgSite" :focus="barcodeFocus">
                <uni-data-select name='orgSite' v-model="orgSite" :localdata="staList"
                    @change="change"></uni-data-select>
            </view>
            <view class="item">
                <view class="code-decs">托盘码:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" >
                <input type="text" placeholder=" 扫码 / 输入" v-model="barcode">
            </view>
<!--             <view class="item">
                <view class="code-decs">目标库位:</view>
                <input type="text" placeholder=" 扫码 / 输入" v-model="tarSite" >
            </view> -->
            <view class="item">
                <uni-data-checkbox mode="button" multiple v-model="checkbox2" :localdata="hobby"></uni-data-checkbox>
                <!-- <uni-data-checkbox mode="tag" multiple v-model="checkbox2" :localdata="hobby"></uni-data-checkbox> -->
            </view>
        </view>
        <view class="mat-list-title">
        </view>
@@ -24,7 +25,7 @@
        </view>
        <!-- 弹窗 -->
        <!-- 修改数量 -->
        <!-- 移除确认 -->
        <view>
            <!-- 提示窗示例 -->
@@ -65,6 +66,11 @@
                barcode: '',
                orderNo: '',
                dataList: [],
                checkbox2: [],
                hobby: [{
                    text: '新台车入库',
                    value: 1
                }],
                count: 0,
                rowNum: '',
                matnr: '',
@@ -80,10 +86,10 @@
                matFocus: false,
                matData: '',
                removeNum: 0,
                locNo:"",
                orgSite:'',
                tarSite:'',
                staList:[],
                locNo: "",
                orgSite: '',
                tarSite: '',
                staList: [],
            }
        },
        onLoad() {
@@ -95,10 +101,14 @@
            this.baseUrl = uni.getStorageSync('baseUrl');
            this.token = uni.getStorageSync('token');
        },
        mounted() {
        mounted() {
            // this.tarSite = uni.getStorageSync('tarSite')
        },
        methods: {
            change(e) {
                console.log('单选值:', e);
                this.orgSite = e
            },
            messageToggle(type) {
                this.msgType1 = type
                this.$refs.message.open()
@@ -123,7 +133,7 @@
            barcodeInput() {
                // 不设置定时器 会出现扫入的字符串不全
                setTimeout(() => {
                    var len = this.barcode.length
                    var len = this.barcode.length
                    this.focuss()
                }, 200)
            },
@@ -149,9 +159,9 @@
                let that = this
                let staResults = [];
                uni.request({
                    url: that.baseUrl + '/mobile/cache/locs',
                    url: that.baseUrl + '/mobile/cache/sites/5',
                    header: {
                        'token':uni.getStorageSync('token')
                        'token': uni.getStorageSync('token')
                    },
                    method: 'GET',
                    success(result) {
@@ -159,7 +169,10 @@
                        if (result.code === 200 && result.data) {
                            staResults.push(...result.data);
                            staResults.forEach(item => {
                                that.staList.push(item?.locNo)
                                that.staList.push({
                                    value: item.devNo,
                                    text: item.devNo
                                })
                            })
                        } else if (result.code == 403) {
                            uni.showToast({
@@ -205,7 +218,7 @@
                });
                that.matnr = ''
            },
            checkMat(mat) {
            checkMat(mat) {
                this.dataList = mat
            },
            // 修改批号
@@ -223,7 +236,7 @@
            },
            // 列表移除按钮
            remove(item, i, type) {
                this.removeNum  = i
                this.removeNum = i
                this.msgType = type
                this.title = '警告'
                this.content = '是否移除当前商品!'
@@ -271,7 +284,7 @@
                    this.messageText = "产线站为空"
                    this.messageToggle('error')
                    return;
                }
                }
                uni.request({
                    url: that.baseUrl + '/mobile/cache/agv/call',
                    data: JSON.stringify({
@@ -288,7 +301,7 @@
                        if (res.code === 200) {
                            that.resst();
                            that.messageText = "呼叫成功"
                            that.messageToggle('success')
                            that.messageToggle('success')
                        } else if (res.code == 403) {
                            that.messageText = res.msg
                            that.messageToggle('error')
@@ -324,8 +337,8 @@
            resst() {
                this.orgSite = ''
                this.dataList = []
            },
        }
    }
@@ -383,4 +396,4 @@
        text-align: center;
        box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
    }
</style>
</style>