#
Junjie
2025-07-18 6efec75705f30d47dfa323e6f4d3f0f829eea000
pages/basics/order.vue
@@ -23,7 +23,7 @@
            </view>
            <view class="square-content">
               <view class="content-input">
                  <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMat()"
                  <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMatInput()"
                  :focus="focus" placeholder-style="line-height:  85rpx;">
                  <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
               </view>
@@ -58,6 +58,7 @@
                  <view><text style="width: 400rpx;">规格:{{item.specs}}</text></view>
               <!--    <view><text style="width: 400rpx;">型号:{{item.model}}</text></view> -->
                  <view><text style="width: 400rpx;">批次:{{item.batch}}</text></view>
                  <view style="width: 500rpx;"><text>型号:{{item.model}}</text></view>
                  <!-- <view><text style="width: 400rpx;">备注:{{item.memo}}</text></view> -->
                  <view>
                     <text style="width: 400rpx;">主数量:{{item.anfme}}</text>
@@ -86,6 +87,9 @@
         
         <label class="label-btn" style="width: 150rpx;">
            <button class="cu-btn" @click="resst()">重置</button>
         </label>
         <label>
            总计辅数量:{{ countWeight }}
         </label>
         <label class="label-btn">
            <button class="cu-btn bg-blue " @click="comb()">组托</button>
@@ -143,7 +147,9 @@
            check:false,
            checkText:'全选',
            checkedData:[],
            batch:''
            batch:'',
            timeout: null,
            countWeight: 0,
         }
      },
      onShow() {
@@ -297,6 +303,12 @@
            });
            that.matnr = ''
         },
         findMatInput() {
            clearTimeout(this.timeout)
            this.timeout = setTimeout(() => {
               this.findMat()
            },600)
         },
         findMat() {
            let that = this
            uni.request({
@@ -350,15 +362,24 @@
         checkMat(mat) {
            var len = this.matList.length
            var add = true
            for (var i = 0; i < len; i++) {
               if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) {
                  this.matList[i].anfme += mat.anfme
                  this.$forceUpdate() // 强制刷新
                  add = false
               }
            }
            // for (var i = 0; i < len; i++) {
            //    if (mat.matnr == this.matList[i].tiaoma){
            //       uni.showToast({title: "条码重复扫了", icon: "none", position: 'top'})
            //    }
            //    // if (mat.matnr == this.matList[i].matnr&&mat.batch == this.matList[i].batch&&mat.orderNo == this.matList[i].orderNo) {
            //    //    this.matList[i].anfme += mat.anfme
            //    //    this.$forceUpdate() // 强制刷新
            //    //    add = false
            //    // }
            // }
            if (add) {
               this.matList.unshift(mat)
               let count = 0;
               this.matList.forEach((item) => {
                  count += item.weight;
               })
               this.countWeight = count;
            }
         },
         change(e) {
@@ -555,7 +576,7 @@
      color: #ffffff;
      display: inline-block;
      float: right;
      width: 180rpx;
      width: 480rpx;
      height: 60rpx;
      margin: 15rpx 15rpx 0rpx 15rpx;
      line-height: 60rpx;
@@ -583,7 +604,7 @@
   }
   .data-list {
      border-bottom: 1px solid #d8d8d8;
      height: 280rpx;
      height: 450rpx;
      margin: 15rpx;
      border-radius: 20rpx;
   }
@@ -615,7 +636,7 @@
      display: inline-block;
      float: right;
      height: 180rpx;
      line-height: 180rpx;
      line-height:480rpx;
   }
   /* display: inline-block;
   float: right;