huangxiaoqiang
2025-11-29 f9e8a2d52fe52fb2389892a46c12d4d262ee9aaf
ÏîÄ¿´úÂë/PDA/pages/task/Inbound.vue
@@ -6,24 +6,19 @@
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="托盘编码">
                  <uni-easyinput type="text" :focus="!istrue" v-model="PalletCode1" placeholder="请输入托盘编码"
                     ref='midInput' />
                  <uni-easyinput type="text" :focus="barcodeFocus" v-model="PalletCode1" placeholder="请输入托盘编码"
                     ref='midInput' @input="Changebarcode()"/>
               </uni-forms-item>
               <uni-forms-item label="入库起点">
                  <uni-easyinput type="text" :focus="istrue" v-model="SourceAddress" placeholder="请输入入库起点"
                  <uni-easyinput type="text" :focus="addressFocus" v-model="SourceAddress" placeholder="请输入入库起点"
                     ref='midInput' />
               </uni-forms-item>
               <uni-forms-item label="入库终点">
                  <uni-easyinput type="text" :focus="istrue" v-model="TargetAddress" placeholder="请输入入库终点"
                     ref='midInput' />
               </uni-forms-item>
               <uni-forms-item label="终 ç‚¹ åŒº åŸŸ">
               <uni-forms-item label="终点区域">
                  <uni-data-select :focus="!istrue" v-model="AreaId" :localdata="range"
                     placeholder="请输选择入库终点区域"></uni-data-select>
               </uni-forms-item>
            </uni-forms>
            <button @click="InboundTask" type="primary" size="default" style="margin-top: 2%;">入库</button>
         </view>
      </view>
      <view v-show="current === 1">
@@ -60,31 +55,6 @@
                     <uni-icons type="trash" class="delete-icon" @click="removeScanItem(item.orderNo)" />
                  </uni-card>
               </view>
               <!-- <uni-list>
                  <uni-list-item direction="column" v-for="(item,index) in InBoundOrder" :key="item.sn">
                     <template v-slot:body>
                        <view class="uni-list-box">
                           <uni-icons type="trash" size="22" style="position: absolute;right: 5%;"
                              @click="deleteList(item.orderNo)">
                           </uni-icons>
                           <view class="uni-content">
                              <view class="uni-title-sub uni-ellipsis-2">订单唯一编码:{{item.orderNo}}</view>
                           </view>
                           <view class="uni-content">
                              <view class="uni-title-sub uni-ellipsis-2">仓库:{{item.warehouseName}}</view>
                           </view>
                           <view class="uni-content">
                              <view class="uni-title-sub uni-ellipsis-2">物料编码:{{item.materialNo}}</view>
                           </view>
                           <uni-forms-item label="数量">
                              <uni-easyinput type="text" :focus="barcodefocus" @input="quantity"
                                 v-model="PalletCode2" placeholder="数量" ref='midInput' />
                           </uni-forms-item>
                        </view>
                     </template>
                  </uni-list-item>
               </uni-list> -->
            </uni-forms>
            <button @click="GroupPlate" type="primary" size="default" style="margin-top: 2%;">组盘</button>
         </view>
@@ -100,8 +70,26 @@
            <button @click="SolvePlate" type="primary" size="default" style="margin-top: 2%;">解盘</button>
         </view>
      </view>
      <view v-show="current === 3">
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="托盘编码">
                  <uni-easyinput type="text" :focus="barcodeFocus" v-model="PalletCode3" placeholder="请输入托盘编码"
                     ref='midInput' @input="Changebarcode()"/>
               </uni-forms-item>
               <uni-forms-item label="入库起点">
                  <uni-easyinput type="text" :focus="addressFocus" v-model="SourceAddress3" placeholder="请输入入库起点"
                     ref='midInput' />
               </uni-forms-item>
               <uni-forms-item label="终点区域">
                  <uni-data-select :focus="!istrue" v-model="acrossFloor" :localdata="rangethree"
                     placeholder="请输选择入库终点区域"></uni-data-select>
               </uni-forms-item>
            </uni-forms>
            <button @click="SendTask" type="primary" size="default" style="margin-top: 2%;">发送任务</button>
         </view>
      </view>
      <u-toast ref="luToast" />
   </view>
   </view>
</template>
@@ -113,12 +101,16 @@
   export default {
      data() {
         return {
            barcodeFocus:true,
            focus: false,
            istrue: false,
            addressFocus:false,
            barcodefocus: false,
            range: [],
            rangethree:[],
            group: [],
            AreaId: 0,
            acrossFloor:0,
            quantity: "",
            SourceAddress: "",
            TargetAddress: "",
@@ -126,12 +118,13 @@
            PalletCode2: "",
            PalletCode3: "",
            materSn: "",
            items: ['入库', '组盘', '解盘'],
            items: ['入库', '组盘', '解盘','双托跨楼层'],
            current: 0
         }
      },
      onLoad(res) {
         this.range = config.AreaId;
         this.rangethree = config.AcrossFloor;
      },
      methods: {
         onClickItem(e) {
@@ -167,6 +160,38 @@
                  this.SourceAddress = "";
                  this.TargetAddress = "";
                  this.AreaId = "";
                  this.istrue = false;
               } else {
                  this.$refs.luToast.show({
                     title: res.message,
                     type: "error"
                  })
               }
            })
         },
         SendTask() {
            if (this.PalletCode3.length <= 0 && this.SourceAddress3.length) {
               this.$refs.luToast.show({
                  title: "托盘编码跟绑定货位不能为空",
                  type: "error"
               })
               return;
            }
            var param = {
               "PalletCode": this.PalletCode3,
               "Position": this.SourceAddress3,
               "AreaId": this.acrossFloor,
               "DoubleTray":1,
            }
            this.$u.post('/api/Task/RequestInboundTaskAsync', param).then(res => {
               if (res.status) {
                  this.$refs.luToast.show({
                     title: res.message,
                     type: "success"
                  })
                  this.PalletCode3 = "";
                  this.SourceAddress3 = "";
                  this.acrossFloor = "";
                  this.istrue = false;
               } else {
                  this.$refs.luToast.show({
@@ -217,7 +242,7 @@
            var param = {
               "PalletCode": this.PalletCode3,
            }
            this.$u.post('/api/StockInfo/DeleteGroupPlateAsync', param).then(res => {
            this.$u.post('/api/BoxingInfo/DeleteGroupPlateAsync', param).then(res => {
               if (res.status) {
                  this.$refs.luToast.show({
                     title: res.message,
@@ -277,6 +302,29 @@
            })
         },
         Changebarcode() {
            this.barcodeFocus = false;
            this.$nextTick(function(x) {
               if (this.PalletCode1 != '') {
                  this.addressFocus = true;
               }
            })
         },
         inputChangebarcode() {
            this.$nextTick(() => {
               this.$u.post('/api/BoxingInfo/GetPalletCodeInfo?palletCode=' + this.PalletCode2, "").then(
                  res => {
                     if (res.status) {
                        this.group = res.data;
                        console.log(this.group);
                        setTimeout(this.updateFocus, 200);
                        setTimeout(() => {
                           this.voiceSpeech('../../static/success.mp3');
                        }, 100);
                     }
                  })
            })
         },
         removeScanItem(orderNo) {
            this.group = this.group.filter(item => item.orderNo !== orderNo);
         }