From 7e83b665f0c3021d6535a25ed50ecc1eef444fd2 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 02 三月 2024 13:10:45 +0800
Subject: [PATCH] #
---
pages/pakin/goodsUp2.vue | 61 ++++++++++++++++++++++++++----
1 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/pages/pakin/goodsUp2.vue b/pages/pakin/goodsUp2.vue
index 4bb326e..d5878e0 100644
--- a/pages/pakin/goodsUp2.vue
+++ b/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: {
--
Gitblit v1.9.1