skyouc
2 天以前 e376c99d80df50257b80a0da99865e80cf6b55c5
pages/listing/matnrPalletising.vue
@@ -15,6 +15,8 @@
            <view class="cu-form-group">
               <view class="title">票号</view>
               <input placeholder="请扫描现品票号" v-model="fieldsIndex" @input="search()" focus></input>
               <text class='cuIcon-close text-gray margin-right-xs' v-show="fieldsIndex!==''"
                  @click="clearCode"></text>
               <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
            </view>
            <view class="cu-form-group">
@@ -24,6 +26,9 @@
         </form>
         <view class="flex solid-bottom padding-sm justify-between">
            <view class="text-blue">物料总类:{{list.length}}</view>
            <view class="content">
               <uni-data-checkbox mode="button" multiple v-model="isHalf" :localdata="boxs"></uni-data-checkbox>
            </view>
            <view class="text-blue">组盘总数:{{allCount}}</view>
         </view>
      </view>
@@ -72,25 +77,12 @@
                     <text class="text-black">票号:<text class="text-grey ">{{item.crushNo}}</text></text>
                  </view>
               </view>
               <!-- <view class="cu-item">
                  <view class="content">
                     <text class="text-black">平台行号: <text class="text-grey ">{{item.platformId}}</text></text>
                  </view>
                  <view class="content">
                     <text class="text-black">质检结果: <text class="text-grey ">{{item.inspect}}</text></text>
                  </view>
               </view> -->
               <view class="cu-item">
                  <view class="content">
                     <text class="text-black">库存单位: <text class="text-grey ">{{item.stockUnit}}</text></text>
                  </view>
                  <view class="content">
                     <text class="text-black">收货数量: <text class="text-grey ">{{item.anfme}}</text></text>
                  </view>
                  <view class="content">
                     <text class="text-black">已上架数量: <text
                           class="text-grey ">{{item.workQty + item.qty}}</text></text>
                  </view>
               </view>
               <view class="cu-item">
@@ -99,8 +91,8 @@
                           class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
                  </view>
                  <view class="content">
                     <uni-data-checkbox mode="button" multiple v-model="isHalf"
                        :localdata="boxs"></uni-data-checkbox>
                     <text class="text-black">已上架数量: <text
                           class="text-grey ">{{item.workQty + item.qty}}</text></text>
                  </view>
               </view>
               <view class="cu-item">
@@ -164,9 +156,9 @@
      mounted() {},
      methods: {
         async search() {
            if (this.fieldsIndex.length < 30) {
               return;
            }
            // if (this.fieldsIndex.length < 25) {
            //    return;
            // }
            const find = this.list.find(el => el.trackCode === this.barcode);
            find ? this.scrollTo() : this.getDet();
         },
@@ -179,12 +171,15 @@
            }
            that.getDetl(param);
         },
         clearCode() {
            this.fieldsIndex = ''
         },
         async getDetl(req) {
            let that = this;
            // uni.showLoading({
            //    title: '加载中...'
            // })
            uni.showLoading({
               title: "加载中...",
               mask: true
            })
            const {
               code,
               data,
@@ -211,7 +206,7 @@
                  position: 'top'
               })
            }
            // uni.hideLoading();
            uni.hideLoading();
         },
         async getList() {
@@ -251,7 +246,6 @@
         showBackData(data) {
            let status;
            data.map(item => {
               item.isHalf = 0;
               this.list.push(item)
            })
            let oldLength = this.list.length
@@ -323,7 +317,6 @@
            }
            this.repeatClick = true
            const newArr = this.list.map(item => {
               return {
                  ...item,
                  anfme: item.anfme === null ? 0 : +item.anfme,
@@ -336,6 +329,7 @@
               msg
            } = await request('/waitPakin/merge', {
               items: newArr,
               isHalf: this.isHalf,
               barcode: this.container,
            })
            if (code === 200) {