skyouc
2025-05-06 3bafe7a5ed8bb14a867944e4c0c3adf583a4174b
pages/rece/other.vue
@@ -8,9 +8,10 @@
            <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
         </view>
         <view class="cu-form-group" v-show="!isconfirm">
            <view class="title">物料标签</view>
            <input placeholder="请扫描物料标签" v-model="barcode"></input>
            <text class='cuIcon-search text-blue' @click="scrollTo"></text>
            <view class="title">物料编码</view>
            <input placeholder="请扫描物料编码" v-model="barcode"></input>
            <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearBarcode"></text>
            <text class='cuIcon-search text-blue' @click="search"></text>
         </view>
      </form>
@@ -26,7 +27,8 @@
                        {{index+1}}
                     </view>
                     <view class="text-blue">
                        {{`${item.maktx}`}}
                        编码:
                        {{`${item.matnr}`}}
                     </view>
                  </view>
                  <view class="action" v-if="!isconfirm">
@@ -37,10 +39,17 @@
               <view class="cu-item">
                  <view class="content">
                     <text class="text-black">ASN:</text>
                  </view>
                  <view class="action">
                     <text class="text-grey ">{{item.asnCode}}</text>
                  </view>
                  <view class="action">
                  </view>
               </view>
               <view class="cu-item">
                  <view class="content">
                     <text class="text-black">物料名称:</text>
                     <text class="text-grey ">{{item.maktx}}</text>
                  </view>
               </view>
               <!--    <view class="cu-item">
@@ -187,7 +196,7 @@
            range: [],
            repeatClick: false,
            isconfirm: false,
            max: 99999999
            max: 99999999,
         }
      },
      computed: {
@@ -208,7 +217,8 @@
               data,
               msg
            } = await request('/orders/other', {
               asnCode: this.asncode
               asnCode: this.asncode,
               matnrCode: this.barcode
            })
            if (code === 200) {
               this.list = [...data]
@@ -224,12 +234,16 @@
         clearCode() {
            this.asncode = ''
         },
         clearBarcode() {
            this.barcode = ''
         },
         scrollTo() {
            const ref = this.$refs[`${this.barcode}ref`][0];
            uni.pageScrollTo({
               scrollTop: ref.$el.offsetTop,
               duration: 300
            })
            // const ref = this.$refs[`${this.barcode}ref`][0];
            // uni.pageScrollTo({
            //    scrollTop: ref.$el.offsetTop,
            //    duration: 300
            // })
         },
         remove(index) {
            this.list.splice(index, 1);
@@ -256,7 +270,7 @@
            console.log(val)
            uni.setStorageSync('whAreaId', val)
         },
         async complete(id) {
         async complete(id) {
            this.repeatClick = true
            const {
               code,
@@ -273,7 +287,7 @@
                  title: msg,
                  icon: "none",
               })
            }
            }
            this.repeatClick = false
         },
         async confirm(isCom) {