1
dengjunjie
2025-06-08 3311f02194604247c1fb0384ecc43cc3ef3f04be
´úÂë¹ÜÀí/ZhongHePDA/pages/task/AgvTask.vue
@@ -5,9 +5,9 @@
      <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 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="Point"
@@ -54,8 +54,8 @@
            range: [],
            EndAddress: "",
            StartAddress: "",
            PalletCode:"",
            Point:"",
            PalletCode: "",
            Point: "",
            items: ['货位绑定', '叫料', '搬运'],
            current: 0
         }
@@ -70,26 +70,27 @@
            }
         },
         Bind() {
            if (this.PalletCode.length <= 0&&this.Point.length) {
            if (this.PalletCode.length == "" || this.Point.length == "") {
               this.$refs.BindluToast.show({
                  title: "托盘编码跟绑定货位不能为空",
                  title: "托盘数量跟绑定货位不能为空",
                  type: "error"
               })
               return;
            }
            var param = {
               MainData: {
                  "PalletCode": this.PalletCode,
                  "Point":this.Point
               },
            }
            this.$u.post('/api/PDA/CallMateriel', param).then(res => {
            // var param = {
            //    MainData: {
            //       "PalletCode": this.PalletCode,
            //       "Point": this.Point
            //    },
            // }
            this.$u.post('/api/PDA/Bind?qty=' + this.PalletCode + '&point=' + this.Point, {}).then(res => {
               if (res.status) {
                  this.$refs.uToast.show({
                     title: "呼叫Agv搬运成功",
                  this.$refs.BindluToast.show({
                     title: "绑定成功",
                     type: "success"
                  })
                  this.EndAddress = "";
                  this.Point = "";
                  this.PalletCode = "";
                  this.istrue = false;
               } else {
                  this.$refs.BindluToast.show({
@@ -100,22 +101,22 @@
            })
         },
         CallMateriel() {
            if (this.EndAddress.length <= 0) {
            if (this.EndAddress == "") {
               this.$refs.CallMaterieluToast.show({
                  title: "请输入终点",
                  type: "error"
               })
               return;
            }
            var param = {
               MainData: {
                  "endPoint": this.EndAddress
               },
            }
            this.$u.post('/api/PDA/CallMateriel', param).then(res => {
            // var param = {
            //    MainData: {
            //       "endPoint": this.EndAddress
            //    },
            // }
            this.$u.post('/api/PDA/CallMateriel?endPoint=' + this.EndAddress, {}).then(res => {
               if (res.status) {
                  this.$refs.uToast.show({
                     title: "呼叫Agv搬运成功",
                  this.$refs.CallMaterieluToast.show({
                     title: "叫料成功",
                     type: "success"
                  })
                  this.EndAddress = "";
@@ -129,21 +130,21 @@
            })
         },
         MaterielCarry() {
            if (this.StartAddress.length <= 0) {
            if (this.StartAddress == "") {
               this.$refs.MaterielCarryuToast.show({
                  title: "请输入起点",
                  type: "error"
               })
               return;
            }
            var param = {
               MainData: {
                  "startPoint": this.StartAddress
               },
            }
            this.$u.post('/api/PDA/MaterielCarry', param).then(res => {
            // var param = {
            //    MainData: {
            //       "startPoint": this.StartAddress
            //    },
            // }
            this.$u.post('/api/PDA/MaterielCarry?startPoint=' + this.StartAddress, {}).then(res => {
               if (res.status) {
                  this.$refs.uToast.show({
                  this.$refs.MaterielCarryuToast.show({
                     title: "呼叫Agv搬运成功",
                     type: "success"
                  })