huangxiaoqiang
2025-06-03 73a077d76b715aee6b9f384b087a6792a84989d8
ÏîÄ¿´úÂë/LGPDA/pages/task/Outbound.vue
@@ -5,8 +5,12 @@
      <view v-show="current === 0">
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="托盘编码">
                  <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="PalletCode"
                     placeholder="请输入托盘编码" ref='midInput' />
               </uni-forms-item>
               <uni-forms-item label="出库库位">
                  <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="SourceAddress"
                  <uni-easyinput type="text" :focus="istrue"  v-model="SourceAddress"
                     placeholder="请输入出库库位" ref='midInput' />
               </uni-forms-item>
            </uni-forms>
@@ -17,12 +21,12 @@
      <view v-show="current === 1">
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="入库站台">
                  <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="StartAddress"
                     placeholder="请输入入库站台" ref='midInput' />
               <uni-forms-item label="出库库位">
                  <uni-easyinput type="text" :focus="!barcodefocus" @input="inputChangebarcode" v-model="StartAddress"
                     placeholder="请输入出库库位" ref='midInput' />
               </uni-forms-item>
            </uni-forms>
            <button @click="SamplingInboundTask" type="primary" size="default" style="margin-top: 2%;">入库</button>
            <button @click="SamplingInboundTask" type="primary" size="default" style="margin-top: 2%;">抽检出库</button>
            <u-toast ref="SamplingInboundTaskluToast" />
         </view>
      </view>
@@ -35,8 +39,10 @@
      data() {
         return {
            istrue: false,
            barcodefocus: false,
            range: [],
            StartAddress: "",
            PalletCode: "",
            SourceAddress:"",
            items: ['出库', '抽检出库'],
            current: 0
@@ -46,6 +52,22 @@
      //    this.getEndLocations();
      // },
      methods: {
         carNoInputChange() {
            this.istrue = false;
            this.$nextTick(function(x) {
               if (this.barcode != '') {
                  this.istrue = true;
               }
            })
         },
         inputChangebarcode() {
            this.barcodefocus = false;
            this.$nextTick(function(x) {
               if (this.barcode != '') {
                  this.barcodefocus = true;
               }
            })
         },
         onClickItem(e) {
            if (this.current != e.currentIndex) {
               this.current = e.currentIndex;
@@ -61,17 +83,19 @@
            }
            var param = {
               // MainData: {
                  "PalletCode": this.PalletCode,
                  "SourceAddress":this.SourceAddress
               // },
            }
            console.log(param);
            this.$u.post('/api/PDA/OutboundTask', param).then(res => {
               if (res.status) {
                  this.$refs.uToast.show({
                     title: "出库任务下发",
                  this.$refs.InboundTaskluToast.show({
                     title: res.message,
                     type: "success"
                  })
                  this.SourceAddress = "";
                  this.PalletCode = "";
                  this.istrue = false;
               } else {
                  this.$refs.InboundTaskluToast.show({
@@ -96,8 +120,8 @@
            }
            this.$u.post('/api/PDA/SamplingOutboundTask', param).then(res => {
               if (res.status) {
                  this.$refs.uToast.show({
                     title: "呼叫Agv搬运成功",
                  this.$refs.SamplingInboundTaskluToast.show({
                     title: res.message,
                     type: "success"
                  })
                  this.StartAddress = "";