#
whycq
2024-03-02 c390c642dbf9d95ccc820ba59b25591c2b376a45
pages/basics/stockQuery.vue
@@ -5,7 +5,7 @@
         <view class="searchBox">
            <view class="searchIcon"><uni-icons type="search" size="20" color="#dadada"></uni-icons></view>
            <view class="searchArea">
               <input v-model="locNo" type="text" placeholder=" 库位号" @input="searchByLoc"></view>
               <input v-model="locNo" type="text" placeholder=" 库位号" @input="searchByLoc" placeholder-style="line-height:  85rpx;"></view>
            <view class="closeIcon"><uni-icons type="closeempty" size="20" color="#dadada" @click="removeLocNo"></uni-icons></view>
         </view>
      </view>
@@ -14,7 +14,7 @@
         <view class="searchBox">
            <view class="searchIcon"><uni-icons type="search" size="20" color="#dadada"></uni-icons></view>
            <view class="searchArea">
               <input v-model="matnr" type="text" placeholder=" 商品编码" @input="searchByMatnr"></view>
               <input v-model="matnr" type="text" placeholder=" 商品编码" @input="searchByMatnr" placeholder-style="line-height:  85rpx;"></view>
            <view class="closeIcon"><uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr"></uni-icons></view>
         </view>
      </view>
@@ -50,7 +50,7 @@
            <view class="data-list-left">
               <view class="matnr"><text style="width: 700rpx;">编码:{{item.matnr}}</text></view>
               <view><text style="width: 700rpx;">品名:{{item.maktx}}</text></view>
               <view><text style="width: 700rpx;">批号:{{item.batch}}</text></view>
               <view><text style="width: 700rpx;">合同号:{{item.batch}}</text></view>
               <view>
                  <text style="width: 700rpx;">数量:{{item.anfme}}</text>
               </view>
@@ -73,6 +73,7 @@
   export default {
      data () {
         return {
            commonUrl:null,
            matList: [],
            locNo: null,
            matnr: null
@@ -84,8 +85,15 @@
         this.baseIP = UIP;
         const UPORT = uni.getStorageSync('UPORT');
         this.basePORT = UPORT
         const PROJ = uni.getStorageSync('UPROJ');
         this.baseUrl = PROJ
         this.getUrl()
      },
      methods: {
         // 获取url
         getUrl() {
            this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
         },
         checkbox: function () {
            
         },
@@ -100,7 +108,7 @@
         request() {
            let that = this
            uni.request({
               url:that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/locDetl/list/auth',
               url:that.commonUrl + '/locDetl/list/auth',
               header:{'token':uni.getStorageSync('token')},
               data: {
                  curr: 1,
@@ -110,13 +118,11 @@
               },
               method:"GET",
               success(result) {
                  console.log(result)
                  let res = result.data
                  let records = res.data.records
                  if (res.code == 200) {
                     if (records) {
                        that.matList = records
                        console.log(that.matList)
                     } else {
                        uni.showToast({
                           title: "暂无更多数据",