#
whycq
2023-12-25 7bbb44bf6c0b49801351af20a0dc2c41b8f08eba
pages/pakin/goodsUp2.vue
@@ -10,6 +10,10 @@
            <uni-combox :candidates="orderNoList" placeholder="请选择来源地"  v-model="origin"></uni-combox>
         </view>
         <view class="item">
            <view class="code-decs">货主:</view>
            <uni-combox :candidates="ownerList" placeholder="请选择货主"  v-model="owner"></uni-combox>
         </view>
         <view class="item">
            <view class="code-decs">库位码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="locNo" >
         </view>
@@ -154,8 +158,9 @@
            locNo:'',
            orderNoList: [],
            code:'',
            origin:''
            origin:'',
            ownerList: [],
            owner: ''
         }
      },
      onLoad() {
@@ -165,6 +170,7 @@
         this.baseUrl = uni.getStorageSync('baseUrl');
         this.token = uni.getStorageSync('token');
         this.getOrderNoList()
         this.getOwnerList()
      },
      methods: {
         findCode(){
@@ -188,6 +194,22 @@
                  for (var i = 0; i < res.data.length; i++) {
                     that.orderNoList.push(res.data[i])
                  }
               }
            })
         },
         getOwnerList(){
            let that = this
            uni.request({
               url: this.baseUrl + '/locOwnerQuery/auth',
               header: {
                  'token':uni.getStorageSync('token')
               },
               method: 'POST',
               success(res) {
                  res = res.data
                  res.data.forEach((item,index) => {
                     that.ownerList.push(item.value)
                  })
               }
            })
         },
@@ -271,7 +293,11 @@
                        // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
                        events: {
                           matList: function(data) {
                              that.checkMat(data.data)
                              // that.checkMat(data.data)
                              for(let i = 0; i < data.data.count; i++) {
                                 // that.checkMat(data.data)
                                 that.dataList.unshift(data.data.mat)
                              }
                           },
                        },
                     });