#
whycq
2023-04-04 fb1f18051c7abd399749ac21351fa7d92019f31e
pages/basics/outPakin.vue
@@ -30,6 +30,15 @@
            </view>
         </view>
         <view class="square-1">
            <view class="square-title" style="display: flex;">
               <view class="title-sign"><view class="sign"></view></view>
               <view class="title-text" style="width: 200rpx;"><text>拥有者</text></view>
               <view style="margin: auto auto;">
                  <uni-combox :candidates="ownerList" placeholder="请选择拥有者" v-model="owner"></uni-combox>
               </view>
            </view>
         </view>
         <view class="square-1">
            <view class="square-title">
               <view class="title-sign"><view class="sign"></view></view>
               <view class="title-text"><text>商品列表</text></view>
@@ -136,7 +145,11 @@
            current: 0,
            isNum:false,
            memo:'',
            hide:true
            hide:true,
            ownerList: [],
            ownerList2: '',
            owner: '',
            ownerId: 0
            
         }
      },
@@ -148,6 +161,7 @@
         const PROJ = uni.getStorageSync('UPROJ');
         this.baseUrl = PROJ
         this.getUrl()
         this.getOwner()
      },
      onLoad() {
         // #ifdef APP
@@ -165,6 +179,32 @@
         getUrl() {
            this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
         },
         getOwner() {
            let that = this
            uni.request({
               url: that.commonUrl + '/locOwner/list/auth',
               header: {'token':uni.getStorageSync('token')},
               success(result) {
                  for (var i = 0; i < result.data.data.records.length; i++) {
                     that.ownerList.push(result.data.data.records[i].owner)
                  }
                  that.ownerList2 = result.data.data.records
               }
            })
            setTimeout(()=>{
            },100)
         },
         getOwnerId(owner) {
            for (var key in this.ownerList2) {
               if (this.ownerList2[key].owner == owner) {
                  this.ownerId = this.ownerList2[key].id
               }
            }
            console.log(this.ownerId);
         },
         radioChange(evt) {
            for (let i = 0; i < this.origins.length; i++) {
               if (this.origins[i].value === evt.detail.value) {
@@ -175,7 +215,6 @@
         },
         // 确认出库口
         check() {
            console.log(this.matList);
            let that = this
            if (this.current == 0) {
               this.origin = 1288
@@ -188,6 +227,7 @@
                data: JSON.stringify({
                  barcode: that.barcode,
                  origin: that.origin,
                  owner: that.ownerId,
                  combMats: that.matList
               }),
               method: 'POST',
@@ -261,6 +301,7 @@
            this.matnrId = '';
            this.matList = [];
            this.barcode = '';
            this.owner = ''
            this.barcodeFocuss();
         },
         removeBarcode() {
@@ -287,9 +328,8 @@
               uni.showToast({title: '请添加商品列表', icon: "none", position: 'top'});
               return;
            }
            // uni.showLoading();
            that.$refs.checkOrigin.open()
            this.getOwnerId(that.owner)
         },
         // 输入的不是数字的排除
         checkNum(theObj) {