#
whycq
2022-02-26 98945badb71cd48e66fd64af2c8f3528f19a18ad
pages/basics/combPro.vue
@@ -13,18 +13,22 @@
      <view class="margin-top">
         <uni-table ref="table" border stripe emptyText="暂无更多数据" rowKey="">
            <uni-tr>
               <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="90">产品编码</uni-th>
               <uni-th align="center" width="90">产品名称</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="200">组托数量</uni-th>
               
            </uni-tr>
            <uni-tr v-for="(item, index) in matData" :key="index">
               <uni-td align="center">{{item.seqNo}}</uni-td>
               <uni-td align="center">{{item.count}}</uni-td>
               <uni-td align="center">{{item.matName}}</uni-td>
               <uni-td align="center">{{item.size}}</uni-td>
               <uni-td align="center">{{item.matNo}}</uni-td>
               <uni-td align="center">{{item.matName}}</uni-td>
               <uni-td align="center">{{item.seqNo}}</uni-td>
               <uni-td align="center">{{item.itemBatch}}</uni-td>
               <uni-td align="center">
                  <button class="uni-button" size="mini" type="primary" @click="confirm(index,item)">修改</button>
                  <button class="uni-button" size="mini" type="warn" @click="remove(index,item)">删除</button>
@@ -33,8 +37,8 @@
         </uni-table>
      </view>
      <view>
         <button class="cu-btn bg-yellow pda-btn" @click="comb()">组托</button>
         <button class="cu-btn bg-grey pda-btn" @click="reset">重置</button>
         <button class="cu-btn bg-yellow pda-btn" @click="comb()">组 托</button>
         <button class="cu-btn bg-grey pda-btn" @click="reset">重 置</button>
      </view>
      <view>
         <!-- 提示信息弹窗 -->
@@ -70,15 +74,20 @@
            rowNum:'',
            value:'',
            couChange:true,
            baseIP:'',
            
            
         }
      },
      mounted(){
         const UIP = uni.getStorageSync('UIP');
         this.baseIP = UIP
      },
      methods: {
            reset:function() {
               this.billNo = '';
               this.code = '';
               this.matData = []
            },
            messageToggle(type) {
               this.msgType = type
@@ -95,22 +104,22 @@
               }
               if(billNo.indexOf('=')>-1){
                  billNo = billNo.split(",")[0].split("=")[1];
                  console.log(billNo)
               }
               if(billNo.length===0){
                  return
               }
               this.matData = []
               uni.request({
                  url:that.baseUrl+ "/mobile/bill/query/auth",
                  url: that.baseHttp + that.baseIP + that.baseUrl + "/mobile/bill/query/auth",
                  header: {
                     'content-type':'application/x-www-form-urlencoded',
                     'token': localStorage.getItem('token')},
                     'token':uni.getStorageSync('token')},
                  data: {
                      billNo: billNo
                  },
                  method: 'POST',
                  success(res){
                     console.log(res)
                     if(res.data.code === 200){
                        if(res.data.data != null){
                           that.addTableData(res.data.data)
@@ -185,8 +194,8 @@
                  return;
               }
               uni.request({
                  url:that.baseUrl+ "/mobile/comb/auth",
                  header: {'token': localStorage.getItem('token')},
                  url: that.baseHttp + that.baseIP + that.baseUrl + "/mobile/comb/auth",
                  header: {'token':uni.getStorageSync('token')},
                  data:{
                     barcode:barcode,
                     combMats:that.matData,
@@ -206,8 +215,6 @@
            },
      },
      onShow() {
         // const query = uni.createSelectorQuery()
         // console.log(prototype.placeholder)
      }
   }
</script>