#
whycq
2022-07-21 8f9c8986975ce99fea8bdc6e965699895ebaf4fd
pages/basics/pakin.vue
@@ -22,14 +22,14 @@
               <view class="title-text"><text>检索商品</text></view>
            </view>
            <view class="square-content">
               <view class="content-input-btn">
               <view class="content-input">
                  <input v-model="matnr" type="text" placeholder="扫码 / 输入" @input="findMat()"
                  :focus="focus" placeholder-style="margin-top:9px">
                  <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons>
               </view>
               <view class="content-btn">
               <!-- <view class="content-btn">
                  <button class="cu-btn bg-blue pda-btn" @click="selectMat()">+提取</button>
               </view>
               </view> -->
            </view>
         </view>
         
@@ -60,7 +60,7 @@
                  </view>
               </view>
               <view class="data-list-right">
                  <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(item,index)"></uni-icons></label>
                  <label><uni-icons type="compose" size="20" color="#a5a5a5" @click="revise(index)"></uni-icons></label>
                  <label><uni-icons type="trash" size="25" color="#a5a5a5" @click="remove(item,index)"></uni-icons></label>
               </view>
            </view>
@@ -98,7 +98,7 @@
            </view>
            <view class="changeBox">
               <view class="num-box">
                  <uni-number-box v-model="count" :min="minCount" :max="maxCount" color="#747474"  @change="changeValue"/>
                  <uni-number-box v-model="counts" :min="0" :max="99999" color="#747474" />
               </view> 
            </view>
            <view class="revise-box-buttom">
@@ -126,7 +126,7 @@
            matList:[],
            result: '',
            enableQty:'',
            count:'',
            counts:'',
            minCount:0,
            maxCount:'',
            rowNum:'',
@@ -242,7 +242,6 @@
                  'token':uni.getStorageSync('token')
                },
               success(result) {
                  console.log(result)
                  uni.hideLoading();
                  var res = result.data
                  if (res.code === 200) {
@@ -296,7 +295,6 @@
                  'token':uni.getStorageSync('token')
                },
               success(result) {
                  console.log(result)
                  uni.vibrateShort();
                  let res = result.data
                  if (res.code === 200 && res.data) {
@@ -308,7 +306,6 @@
                            // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
                            matList: function(data) {
                              that.matList.push(data.data)
                              console.log(that.matList)
                           },
                        },
                        success: function(res) {
@@ -352,27 +349,37 @@
            }
            uni.vibrateShort();
         },
         revise(item,index) {
            var maxCount = this.matList[index].maxCount
            if (maxCount == undefined ) {
               this.matList[index]["maxCount"] = item.enableQty
            }
            this.enableQty = item.enableQty
            this.count = this.minCount
            this.maxCount = item.maxCount
         revise(index) {
            this.rowNum = index
            this.eject()
         },
         eject(type) {
            this.type = type
            // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
            this.$refs.revise.open(type)
         },
         changeValue() {
            this.$refs.revise.open()
            // this.matList[this.rowNum].count = this.count
            // this.eject()
            // var maxCount = this.item.maxCount
            // if (maxCount == undefined ) {
            //    this.matList[index]["maxCount"] = item.enableQty
            // }
            // this.enableQty = item.enableQty
            // this.count = this.minCount
            // this.maxCount = item.maxCount
            
         },
         eject() {
            // this.type = type
            // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
            this.$refs.revise.open()
         },
         // 确认组托数量
         confirm() {
            this.matList[this.rowNum].anfme = this.count
            this.matList[this.rowNum].count = this.counts
            this.matList = this.matList
            console.log(this.counts)
            console.log(this.matList[this.rowNum].count)
            this.$refs.revise.close()
         },
         // 列表反选
@@ -539,7 +546,7 @@
      margin-top: 20rpx;
   }
   .data-list:last-child {
      margin-bottom: 120rpx;
      margin-bottom: 170rpx;
   }
   /* .data-list-left {
      display: inline-block;