#
zjj
2024-04-17 e4dc67055ea0c21e72815054c044b56a76ec625e
pages/pakin/goodsUp2.vue
@@ -47,9 +47,13 @@
                  <view class="desc">产地:</view>
                  <view class="left-item">{{item.origin}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">批次:</view>
                  <view class="left-item">{{item.batch}}</view>
               </view>
               
               <view class="list-left-item">
                  <view class="desc">公斤:</view>
                  <view class="desc">公斤(数量):</view>
                  <view class="left-item">{{item.anfme}}</view>
               </view>
            </view>
@@ -137,7 +141,7 @@
            baseUrl: '',
            token: '',
            barcode: '',
            dataList: [{}],
            dataList: [],
            count: 0,
            rowNum: '',
            matnr: '',
@@ -180,10 +184,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.anfme}
                     let matnr = {}
                     that.findMat2(res.data.matnr).then(result=>{
                        result['batch'] = res.data.batch
                        result['anfme'] = res.data.anfme
                        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 +503,8 @@
         resst() {
            this.dataList = []
            this.barcode = ''
            this.locNo = ''
            this.owner = ''
            this.barcodeFocuss()
         },
         adjust() {
@@ -490,12 +538,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: {