#
whycq
2024-03-02 7e83b665f0c3021d6535a25ed50ecc1eef444fd2
#
1个文件已修改
61 ■■■■ 已修改文件
pages/pakin/goodsUp2.vue 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/pakin/goodsUp2.vue
@@ -137,7 +137,7 @@
                baseUrl: '',
                token: '',
                barcode: '',
                dataList: [{}],
                dataList: [],
                count: 0,
                rowNum: '',
                matnr: '',
@@ -180,10 +180,52 @@
        methods: {
            findCode(){
                let that = this
                if(that.code.length < 10){
                    that.barcodeFocuss()
                    return;
                }
                uni.request({
                    url: that.baseUrl + '/mobile/manDetl/in/origin/origin',
                    header: { 'token':uni.getStorageSync('token') ,
                    "content-type":"application/x-www-form-urlencoded"},
                    data: {
                        code: that.code,
                        origin: that.origin,
                    },
                    method: 'GET',
                    success(res) {
                        res = res.data
                        if (res.code === 200) {
                            let item = {matnr:res.data.matnr,batch:res.data.batch,weight:res.data.weight}
                            let matnr = {}
                            that.findMat2(res.data.matnr).then(result=>{
                                result['batch'] = res.data.batch
                                result['anfme'] = 0
                                result.weight = res.data.weight
                                that.dataList.push(result)
                            })
                            that.barcodeFocus = false
                            setTimeout(()=>{
                                that.code = ''
                                that.barcodeFocus = true
                            })
                        }
                    }
                })
            },
            async findMat2(matnr) {
                let that = this
                let item = {}
                let abb = await uni.request({
                    url: that.baseUrl + '/mat/auth',
                    data: {
                        matnr: matnr
                    },
                    header: {
                        'token': uni.getStorageSync('token')
                    },
                }).then((result)=> {
                    item = result.data.data
                })
                return item
            },
            messageToggle(type) {
                this.msgType1 = type
@@ -457,6 +499,8 @@
            resst() {
                this.dataList = []
                this.barcode = ''
                this.locNo = ''
                this.owner = ''
                this.barcodeFocuss()
            },
            adjust() {
@@ -490,12 +534,11 @@
                    }
                }
                uni.request({
                    url: that.baseUrl + '/mobile/manDetl/in/origin',
                    url: that.baseUrl + '/mobile/manDetl/in/no/origin',
                    data: JSON.stringify({                        
                        locNo:that.locNo,
                        code:that.code,
                        origin:that.origin,
                        combMats: that.dataList
                        combMats: that.dataList,
                        owner: that.owner
                    }),
                    method: 'POST',
                    header: {