dengjunjie
5 天以前 4f39dcc195f28fa275fc2d065fbf1bf6a46c21b7
´úÂë¹ÜÀí/ZhongHePDA/pages/basic/cachePoint.vue
@@ -6,11 +6,15 @@
         <view style="padding: 5%;">
            <uni-forms label-width="120">
               <uni-forms-item label="缓存点">
                  <uni-easyinput type="text" :focus="!istrue" @input="carNoInputChange" v-model="value"
                  <uni-easyinput type="text" :focus="!istrue" @input="barcodeInput" v-model="Point"
                     placeholder="请输入缓存点" ref='midInput' />
               </uni-forms-item>
               <uni-forms-item label="托盘数量">
                  <uni-easyinput type="text" :focus="istrue" v-model="PalletCode" placeholder="请输入托盘数量"
                     ref='midInput' />
               </uni-forms-item>
            </uni-forms>
            <button @click="submit" type="primary" size="default" style="margin-top: 2%;">释放</button>
            <button @click="Bind" type="primary" size="default" style="margin-top: 2%;">绑定</button>
            <u-toast ref="BindluToast" />
         </view>
      </view>
@@ -22,13 +26,10 @@
                     placeholder="请输入缓存点" ref='midInput' />
               </uni-forms-item>
            </uni-forms>
            <button @click="submit" type="primary" size="default" style="margin-top: 2%;">拆包</button>
            <u-toast ref="uToast" />
            <button @click="submit" type="primary" size="default" style="margin-top: 2%;">释放</button>
            <u-toast ref="BindluToast1" />
         </view>
      </view>
      <!-- <view v-show="current === 2">
                é€‰é¡¹å¡3的内容
            </view> -->
   </view>
   </view>
</template>
@@ -39,8 +40,10 @@
         return {
            istrue: false,
            range: [],
            PalletCode: "",
            Point: "",
            value: "",
            items: ['释放缓存位'], //, '拆包'
            items: ['绑定缓存点', '释放缓存点'], //, '拆包'
            current: 0
         }
      },
@@ -48,14 +51,50 @@
         this.getEndLocations();
      },
      methods: {
         barcodeInput() {
            this.$nextTick(function(x) {
               if (this.Point.length > 0) {
                  this.istrue = true;
               }
            })
         },
         onClickItem(e) {
            if (this.current != e.currentIndex) {
            this.istrue = false;
            if (this.current !== e.currentIndex) {
               this.current = e.currentIndex;
               if (this.current == 2) {
                  this.getData();
               }
            }
         },
         Bind() {
            if (this.PalletCode.length == "" || this.Point.length == "") {
               this.$refs.BindluToast.show({
                  title: "托盘数量跟绑定货位不能为空",
                  type: "error"
               })
               return;
            }
            this.$u.post('/api/PDA/Bind?qty=' + this.PalletCode + '&point=' + this.Point, {}).then(res => {
               if (res.status) {
                  this.$refs.BindluToast.show({
                     title: "绑定成功",
                     type: "success"
                  })
                  this.Point = "";
                  this.PalletCode = "";
                  this.istrue = false;
               } else {
                  this.$refs.BindluToast.show({
                     title: res.message,
                     type: "error"
                  })
               }
            })
         },
         submit() {
            if (this.value == "") {
               this.$refs.BindluToast.show({
               this.$refs.BindluToast1.show({
                  title: "请输入缓存点",
                  type: "error"
               })
@@ -69,7 +108,7 @@
            // }
            this.$u.post('/api/PDA/AcrossFloorCallMat?Point=' + this.value, {}).then(res => {
               if (res.status) {
                  this.$refs.BindluToast.show({
                  this.$refs.BindluToast1.show({
                     title: "释放成功",
                     type: "success"
                  })
@@ -78,7 +117,7 @@
                  // this.locationNo = "";
                  this.istrue = false;
               } else {
                  this.$refs.BindluToast.show({
                  this.$refs.BindluToast1.show({
                     title: res.message,
                     type: "error"
                  })