zwl
2025-06-30 f314d9b1b05d96c1a1e443470064eeeed8917f93
pages/pakin/pakin.vue
@@ -2,7 +2,7 @@
   <view>
      <view class="code">
         <view class="item">
            <view class="code-decs">托盘码:</view>
            <view class="code-decs">站点码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
               @input="barcodeInput()">
         </view>
@@ -41,17 +41,17 @@
                  <view class="left-item">{{item.specs}}</view>
               </view>
               <view class="list-left-item">
                  <view class="desc">批号:</view>
                  <view class="desc" style="width: 38%;">情况说明:</view>
                  <view class="left-item">
                     <uni-tag :text="item.batch" type="warning"></uni-tag>
                  </view>
               </view>
               <view class="list-left-item">
               <!-- <view class="list-left-item">
                  <view class="desc">重量:</view>
                  <view class="left-item">
                     <uni-tag :text="item.weight" type="warning"></uni-tag>
                  </view>
               </view>
               </view> -->
               <view class="list-left-item">
                  <view class="desc">数量:</view>
                  <view class="left-item">{{item.anfme}}</view>
@@ -82,14 +82,14 @@
                        style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
                  </view>
               </view>
               <!-- <view class="popup-item">
                  <view class="popup-item-left">批号:</view>
                  <view class="popup-item-right"><input type="text" v-model="batch"></view>
               </view> -->
               <view class="popup-item">
                  <view class="popup-item-left" style="width: 20vw;">情况说明:</view>
                  <view class="popup-item-right" style="width: 46vw;"><input type="text" v-model="batch"></view>
               </view>
               <!-- <view class="popup-item">
                  <view class="popup-item-left">重量:</view>
                  <view class="popup-item-right"><input type="text" v-model="weight"></view>
               </view>
               </view> -->
               <view class="popup-item">
                  <view class="popup-item-left">数量:</view>
                  <view class="popup-item-right" style="border: none;justify-content: center;">
@@ -172,10 +172,11 @@
         },
         // barcode input 事件
         barcodeInput() {
            this.barcode = this.barcode.replace(/^\{|\}$/g, '')
            // 不设置定时器 会出现扫入的字符串不全
            setTimeout(() => {
               var len = this.barcode.length
               if (len != 8) {
               if (len != 3) {
                  uni.showToast({
                     title: '托盘码有误请重试',
                     icon: "none",
@@ -198,7 +199,8 @@
         },
         // 商品光标清空重置
         focuss() {
            this.focus = false;
            this.barcodeFocus = false;
            this.matFocus = false;
            setTimeout(() => {
               this.matnr = '';
               this.matFocus = true;
@@ -207,10 +209,19 @@
         // 搜索物料
         findMat() {
            let that = this
            var mat = that.matnr
            let submitMat
            let newMatnr
            if (mat.includes(';')) {
               newMatnr = mat.split(';')
               submitMat = newMatnr[1]
            } else {
               submitMat = mat
            }
            uni.request({
               url: that.baseUrl + '/mat/auth',
               data: {
                  matnr: that.matnr
                  matnr: submitMat
               },
               header: {
                  'token': uni.getStorageSync('token')
@@ -312,6 +323,7 @@
            if (add) {
               this.dataList.unshift(mat)
            }
            this.$forceUpdate() // 强制刷新
         },
         // 修改批号
         revise(item, i) {