#
whycq
2023-03-19 9cb61384d6107dec856572260a2107bcc193b873
pages/pakin/pakin.vue
@@ -9,7 +9,7 @@
            <view class="code-decs">物料码:</view>
            <input type="text" placeholder=" 扫码 / 输入">
            <view class="item-right">
               <text style="text-align: right;">提取+</text>
               <text style="text-align: right;color: #409EFF;">提取+</text>
               <uni-icons type="right" color="#c1c1c1"></uni-icons>
            </view>
         </view>
@@ -58,43 +58,24 @@
      </view>
      <!-- 弹窗 -->
      <!-- 修改数量 -->
      <!-- <uni-popup ref="revise" background-color="#fff">
         <view class="revise-box ">
            <view class="" style="position: relative;left: 50px;margin-bottom: 20px;">
               <text style="display: inline-block;float: left;width: 60px;">合同号:</text>
               <input type="text" style="width: 100px;border-bottom: 1px solid #9e9e9e;" v-model="dataList.batch">
            </view>
            <view class="changeBox">
               <view class="num-box">
                  <text style="display: inline-block;float: left;width: 60px;">数量:</text>
                  <uni-number-box :value="count" :max="9999" color="#747474"  @change="changeValue"/>
               </view>
            </view>
            <view class="revise-box-buttom">
               <view>
                  <button class="cu-btn bg-blue" @click="confirm()">确认</button>
               </view>
            </view>
         </view>
      </uni-popup> -->
      <view>
         <uni-popup ref="revise" type="dialog">
            <view class="popup">
               <!-- 标题 -->
               <view class="title">配 置</view>
               <view class="title">修 改</view>
               <view class="popup-item">
                  <view class="popup-item-left">合同号:</view>
                  <view class="popup-item-right"><input type="text"></view>
                  <view class="popup-item-right"><input type="text" v-model="batch"></view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">数量:</view>
                  <view class="popup-item-right" style="border: none;justify-content: center;">
                     <uni-number-box :value="dataList.concat" :max="9999" color="#747474"  @change="changeValue"/>
                     <uni-number-box :value="count" :max="9999999" color="#747474"  @change="changeValue"/>
                  </view>
               </view>
               <view class="btn">
                  <view class="btn-left" @click="close">取消</view>
                  <view class="btn-right">确认</view>
                  <view class="btn-right" @click="confirm()">确认</view>
               </view>
            </view>
         </uni-popup>
@@ -150,9 +131,9 @@
               anfme: "12"
            }
            ],
            count: '',
            count: 0,
            rowNum: '',
            batch: ''
         }
      },
      onLoad() {
@@ -161,19 +142,12 @@
      methods: {
         revise(item,i) {
            this.count = this.dataList[i].anfme
            // 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
            this.batch = this.dataList[i].batch
            this.rowNum = i
            this.eject()
         },
         eject(type) {
            this.type = type
            // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
            this.$refs.revise.open(type)
         },
         // 列表删除按钮
@@ -181,10 +155,16 @@
            this.dataList.splice(index,1)
         },
         confirm() {
            this.dataList[this.rowNum].anfme = this.dataList.count
            this.dataList[this.rowNum].batch = this.dataList.batch
            this.dataList[this.rowNum].anfme = this.count
            this.dataList[this.rowNum].batch = this.batch
            this.$refs.revise.close()
            this.$forceUpdate() // 强制刷新
         },
         close() {
            this.$refs.revise.close()
         },
         changeValue(value) {
            this.count = value
         },
      }
   }
@@ -197,7 +177,7 @@
      position: fixed;
      min-height: 200rpx;
      background-color: #FFF;
      z-index: 999;
      z-index: 10;
   }
   .item {
      display: flex;
@@ -231,7 +211,7 @@
      background-color: white;
      position: fixed;
      margin-top: 200rpx;
      z-index: 998;
      z-index: 9;
      /* border-top: 1px solid #DCDFE6; */
      text-align: center;
      box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.5);