#
whycq
2022-08-31 59cb4011ecfdb36adca04ffef3e65644eb436f5f
pages/basics/offLines.vue
@@ -8,7 +8,7 @@
         </view>
         <view class="square-content">
            <view class="content-input">
               <input type="text" v-model="yyds" placeholder="扫码 / 输入" @input="find" :focus="focus">
               <input type="text" v-model="matnr" placeholder="扫码 / 输入" @input="find" :focus="focus">
               <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
            </view>
         </view>
@@ -21,11 +21,41 @@
         </view>
         <view class="square-content">
            <view class="content-input">
               <input type="text" v-model="yyds" placeholder="扫码 / 输入" @input="find" :focus="focus">
               <input type="text" v-model="locno" placeholder="扫码 / 输入" @input="find" :focus="focus">
               <uni-icons type="closeempty" size="20" color="#dadada"></uni-icons>
            </view>
         </view>
      </view>
      <!-- 商品列表表头 -->
      <view class="square-1">
         <view class="square-title">
            <view class="title-sign"><view class="sign"></view></view>
            <view class="title-text"><text>商品列表</text></view>
         </view>
      </view>
      <view class="square-none" v-show="matList.length == 0">
         <view class="v-show">暂无更多数据...</view>
      </view>
      <checkbox-group>
         <view v-for="(item,index) in matList" :key="index" class="data-list bg-false" :class="'bg-'+item.checked" >
            <view class="data-list-left">
               <view class="matnr"><text style="width: 400rpx;">编码:{{item.matnr}}</text></view>
               <view><text style="width: 400rpx;">品名:{{item.maktx}}</text></view>
               <view><text style="width: 400rpx;">批号:{{item.batch}}</text></view>
               <view>
                  <text style="width: 400rpx;">数量:{{item.anfme}}</text>
               </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="trash" size="25" color="#a5a5a5" @click="removeItem(item,index)"></uni-icons></label>
            </view>
         </view>
      </checkbox-group>
      <!-- 底部按钮 -->
      <view class="footer flex justify-around">
         <!-- <label class="label-btn" style="width: 170rpx;">
@@ -48,11 +78,44 @@
<script>
    export default {
       data() {
      data() {
          return {
            yyds:'',
            matnr: '',
            locno: '',
            matList: [],
            focus:true
         }
      },
      methods: {
         comb() {
            let that = this
            var offSaleParam = {}
            offSaleParam['locNo'] = 'NA003'
            offSaleParam['matnr'] = 'YJ2022081808312309'
            offSaleParam['anfme'] = 4
            uni.request({
               url:'http://localhost:8081/lywms/mobile/mat/offSale/auth',
               data:JSON.stringify(offSaleParam),
               method:'POST',
               success(result) {
                  var res = result
                  console.log(res);
                  if (res.code === 200) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'});
                     that.resst()
                  } else if(res.code === 403) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                     setTimeout(() => {
                        uni.reLaunch({
                           url: '../login/login'
                        });
                     }, 1000);
                  } else {
                     uni.showToast({title: res.msg, icon: "none",position: 'top'})
                  }
               }
            })
         }
      }
    }
</script>