| <template> | 
|   <view class="overflow" style="padding-bottom: 150rpx"> | 
|     <cu-custom bgColor="bg-white" :isBack="true"> | 
|       <block slot="backText"> </block> | 
|       <block slot="content">看板卡叫料</block> | 
|     </cu-custom> | 
|     <u-form | 
|       labelPosition="left" | 
|       label-width="180rpx" | 
|       :model="warehouse" | 
|       ref="warehouseRef" | 
|     > | 
|       <u-row | 
|         class="border_bottom margin_top10rpx padding_left25rpx" | 
|         style="background-color: #fff" | 
|       > | 
|         <u-col span="12"> | 
|           <u-form-item | 
|             label="看板卡号:" | 
|             prop="kanBanCardNo" | 
|             required | 
|             class="uFormItem" | 
|           > | 
|             <u-input | 
|               v-model.trim="warehouse.kanBanCardNo" | 
|               :disabled="kwbhAllowed" | 
|               @confirm="getContainerData" | 
|               placeholder="请录入或扫码" | 
|               class="width" | 
|               :focus="curFoucus" | 
|             > | 
|             </u-input> | 
|           </u-form-item> | 
|         </u-col> | 
|       </u-row> | 
|     </u-form> | 
|     <!-- 列表 --> | 
|     <view class="margin_top10rpx"> | 
|       <u-swipe-action | 
|         :show="item.show" | 
|         :index="eindex" | 
|         v-for="(item, eindex) in singlist" | 
|         :key="eindex" | 
|         :options="options" | 
|         @click="longpress" | 
|         @open="open" | 
|         @close="close" | 
|         class="margin_bottom10rpx" | 
|       > | 
|         <view class="item u-border-bottom"> | 
|           <!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 --> | 
|           <view class="title-wrap"> | 
|             <view | 
|               :class="item.checked ? 'bg_item' : ''" | 
|               class="fontSize32rpx width margin_auto background_fff padding10 relative box_sizing transition" | 
|             > | 
|               <u-row> | 
|                 <u-col span="12" class="flex align-center"> | 
|                   <!-- <u-checkbox v-model="item.checked" size="50rpx"></u-checkbox> --> | 
|                   <view | 
|                     class="flex justify-center align-center" | 
|                     style=" | 
|                       background-color: #f18202; | 
|                       color: #fff; | 
|                       border-radius: 50vh; | 
|                       width: 40rpx; | 
|                       height: 40rpx; | 
|                     " | 
|                   > | 
|                     {{ eindex + 1 }} | 
|                   </view> | 
|                   <text class="color_f18202 padding_left10rpx"> | 
|                     {{ item.materialCode }} - {{ item.materialName }} | 
|                   </text> | 
|                 </u-col> | 
|               </u-row> | 
|   | 
|               <u-row> | 
|                 <u-col span="12"> | 
|                   <text class="color_80 padding_left25rpx"> | 
|                     看板卡:{{ item.kanBanCardNo }} | 
|                   </text> | 
|                 </u-col> | 
|               </u-row> | 
|   | 
|               <u-row> | 
|                 <u-col span="12"> | 
|                   <text class="color_80 padding_left25rpx"> | 
|                     供应商编号:{{ item.supplierCode }} | 
|                   </text> | 
|                 </u-col> | 
|               </u-row> | 
|   | 
|               <u-row> | 
|                 <u-col span="7"> | 
|                   <text class="color_80 padding_left25rpx"> | 
|                     源库区:{{ item.sourceAreaCode }} | 
|                   </text> | 
|                 </u-col> | 
|                 <u-col span="5"> | 
|                   <text class="color_80"> | 
|                     目标库区:{{ item.toAreaCode }} | 
|                   </text> | 
|                 </u-col> | 
|               </u-row> | 
|               <u-row> | 
|                 <u-col span="7"> | 
|                   <text class="color_80 padding_left25rpx"> | 
|                     目标库位:{{ item.toPlaceName }} | 
|                   </text> | 
|                 </u-col> | 
|                 <u-col span="5"> | 
|                   <text class="color_f18202"> 数量:{{ item.quantity }} </text> | 
|                 </u-col> | 
|               </u-row> | 
|             </view> | 
|           </view> | 
|         </view> | 
|       </u-swipe-action> | 
|     </view> | 
|     <modal-code :rescode="rescode" :resmessage="resmessage" ref="resmodal" /> | 
|   | 
|     <button-modal | 
|       :empTytowerShow="true" | 
|       cleaningTitle="重置" | 
|       garmenTitle="确认" | 
|       @submit="submit" | 
|       @reset="back" | 
|     /> | 
|   </view> | 
| </template> | 
| <script> | 
| import ButtonModal from "../../components/buttonModal.vue"; | 
| import ModalCode from "../../components/ModalCode.vue"; | 
| import { | 
|   getWmsConfigKbcard, | 
|   addKbcardOrderMovement, | 
| } from "@/api/hander/hander.js"; | 
| export default { | 
|   data() { | 
|     return { | 
|       operator: "", | 
|       warehouse: { | 
|         kanBanCardNo: "", | 
|         materialCode: "", | 
|         dutyCycle: "", | 
|         gridNumber: 1, | 
|         useNumber: 0, | 
|         exitNumber: 0, | 
|       }, | 
|       singlist: [], //详情列表 | 
|       ordersId: 0, //当前容器绑定的上架单 | 
|       rescode: 0, | 
|       resmessage: "", | 
|       options: [], | 
|       detailshow: false, | 
|       materlist: {}, | 
|       curFoucus: true, | 
|       timer: null, | 
|       timerSm: null, | 
|       detailableZb: false, | 
|       detailable: false, | 
|       gridFocus: false, | 
|       gridable: true, | 
|       kwbhAllowed: false, | 
|       show: false, | 
|     }; | 
|   }, | 
|   components: { | 
|     ButtonModal, | 
|     ModalCode, | 
|   }, | 
|   onLoad() { | 
|     this.operator = JSON.parse(uni.getStorageSync("userInfo")).name; | 
|   }, | 
|   watch: { | 
|     kanBanCardNo(val) { | 
|       if (!val) { | 
|         this.detailable = false; | 
|         this.detailableZb = false; | 
|         this.warehouse.exitNumber = 0; | 
|       } | 
|     }, | 
|   }, | 
|   methods: { | 
|     //确认 | 
|     submit() { | 
|       uni.showModal({ | 
|         title: "看板卡叫料", | 
|         content: "是否确认看板卡叫料?", | 
|         showCancel: true, | 
|         cancelColor: "#333333", | 
|         success: (res) => { | 
|           if (res.confirm) { | 
|             if (this.singlist.length <= 0 || !this.singlist[0].kanBanCardNo) { | 
|               uni.showToast({ | 
|                 title: "看板卡号不存在", | 
|                 icon: "none", | 
|                 duration: 2000, | 
|               }); | 
|               return; | 
|             } | 
|             addKbcardOrderMovement({ | 
|               KanBanCardNo: this.singlist[0].kanBanCardNo, | 
|             }).then((res) => { | 
|               this.rescode = 200; | 
|               this.$refs.resmodal.show = true; | 
|               this.resmessage = "看板卡叫料成功"; | 
|               this.back(); | 
|             }); | 
|           } else if (res.cancel) { | 
|           } | 
|         }, | 
|       }); | 
|     }, | 
|     //获取容器的信息 | 
|     getContainerData() { | 
|       if (this.warehouse.kanBanCardNo == "") { | 
|         uni.showToast({ | 
|           title: "请扫看板卡号", | 
|           icon: "none", | 
|           duration: 2000, | 
|         }); | 
|         return; | 
|       } | 
|       getWmsConfigKbcard({ | 
|         kanBanCardNo: this.warehouse.kanBanCardNo, | 
|         page:1, | 
|         pageSize:1 | 
|       }).then((res) => { | 
|         const result = res.result.items; | 
|         this.singlist = []; | 
|         if (Array.isArray(result) && result.length == 0) { | 
|           uni.showToast({ | 
|             title: "数据不存在", | 
|             icon: "none", | 
|             duration: 2000, | 
|           }); | 
|           return; | 
|         } | 
|         // if (result && result.length == 1) { | 
|         //   result[0].checked = true; | 
|         // } | 
|         this.singlist.push(result[0]); | 
|       }); | 
|     }, | 
|   | 
|     //全部取消 | 
|     back() { | 
|       this.singlist = []; | 
|       this.warehouse.kanBanCardNo = ""; | 
|       this.$refs.warehouseRef.resetFields(); | 
|     }, | 
|   }, | 
|   unmounted() {}, | 
| }; | 
| </script> | 
| <style lang="scss"> | 
| .content { | 
|   height: 500rpx; | 
|   overflow-y: scroll; | 
|   width: 100%; | 
|   padding: 15rpx; | 
|   box-sizing: border-box; | 
|   | 
|   .content-item { | 
|     padding: 15rpx; | 
|     background-color: #fff; | 
|     margin-bottom: 15rpx; | 
|     border-radius: 8rpx; | 
|     font-size: 32rpx; | 
|   } | 
| } | 
|   | 
| .bg_item { | 
|   background: #ffebcd !important; | 
| } | 
| </style> |