#
whycq0520
2022-03-23 dd8aa40384af417f56d7417e0ab39994d33e12f1
pages/basics/stockQuery.vue
@@ -6,28 +6,37 @@
      </view>
      <view class="cu-form-group margin-top">
         <view class="title">产品</view>
         <input v-model="matNo" placeholder="产品信息" name="input" @input="findByMatNo()"></input>
         <input v-model="matNo" placeholder="产品" name="input" @input="findByMatNo()"></input>
      </view>
      <view class="margin-top">
         <uni-table border stripe emptyText="暂无更多数据">
            <uni-tr>
               <uni-th width="90">产品ID</uni-th>
               <uni-th width="90">产品名称</uni-th>
               <uni-th width="90">库位</uni-th>
               <uni-th width="70">数量</uni-th>
               <uni-th align="center" width="90">产品ID</uni-th>
               <uni-th align="center" width="90">产品名称</uni-th>
               <uni-th align="center" width="90">产品代号</uni-th>
               <uni-th align="center" width="90">库位</uni-th>
               <uni-th align="center" width="70">数量</uni-th>
            </uni-tr>
            <uni-tr v-for="(item, index) in locDetlData" :key="index" @input="tabRender()">
               <uni-td>{{item.matNo}}</uni-td>
               <uni-td>{{item.matName}}</uni-td>
               <uni-td>{{item.locNo}}</uni-td>
               <uni-td>{{item.count}}</uni-td>
               <uni-td align="center">{{item.matNo}}</uni-td>
               <uni-td align="center">{{item.matName}}</uni-td>
               <uni-td align="center">{{item.size}}</uni-td>
               <uni-td align="center">{{item.locNo}}</uni-td>
               <uni-td align="center">{{item.count}}</uni-td>
            </uni-tr>
         </uni-table>
         
      </view>
      <view class="reset">
         <button class="cu-btn bg-grey pda-btn1" @click="reset">重 置</button>
      <view style="height: 200rpx;">
          <!-- 空白层 -->
      </view>
      <view class="cu-bar foot justify-center input" style="height: 130rpx;">
         <view class="reset flex solid-bottom padding justify-center" >
            <button class="cu-btn bg-grey main-btn margin-xs" style="width: 400rpx;" @click="reset">重 置</button>
         </view>
      </view>
   </view>
</template>
@@ -38,13 +47,28 @@
            locNo:'',
            matNo:'',
            locDetlData:[],
            basePORT:'',
            msgType: '',
            messageText: '',
         }
      },
      mounted(){
         const UIP = uni.getStorageSync('UIP');
         this.baseIP = UIP;
         const UPORT = uni.getStorageSync('UPORT');
         this.basePORT = UPORT;
      },
      methods: {
         reset:function() {
            let that = this;
            that.locNo = '';
            that.matNo = '';
            that.locDetlData = [];
         },
         messageToggle(type) {
            this.msgType = type
            this.messageText = '提取失败'
            this.$refs.message.open()
         },
         // 根据库位号查找库存明细
         findByLocNo(){
@@ -66,7 +90,7 @@
         find(){
            let that = this
            uni.request({
               url: that.baseHttp + that.baseIP + that.baseUrl + "/mobile/locDetl/stockQuery",
               url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + "/mobile/locDetl/stockQuery",
               header:{
                  'content-type':'application/x-www-form-urlencoded',
                  'token':uni.getStorageSync('token')
@@ -77,14 +101,23 @@
               },
               method: 'POST',
               success(res) {
                  if(res.data.code === 200){
                     if(res.data.data != null){
                  console.log(res)
                  if(res.data.code === 200) {
                     if(res.data.data != null) {
                        that.locDetlData = res.data.data
                     } else if (res.data.code ===403){
                     } else {
                     }
                     };
                  } else if (res.data.code ===403) {
                     uni.navigateBack({
                         delta: 1
                     })
                  } else {
                     console.log(1)
                     uni.showToast({
                        title: res.data.msg,
                        icon: 'error',
                        duration:  1500
                     });
                  }
               }
            })
@@ -95,16 +128,19 @@
</script>
<style>
   .reset {
   /* .reset {
      
      position: absolute;
      width: 750upx;
      bottom: 80upx;
   }
      bottom: 280upx;
   } */
   .pda-btn1 {
      display: flex;
      flex-direction:row;
      justify-content: center;
      width: 150upx;
      margin-left:260rpx;
      margin-right: auto;
      margin-top: 150rpx;
      width: 200rpx;
      height: 80rpx;
      font-size: 30upx;
      font-weight: bold;
   }
</style>