From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期三, 28 五月 2025 16:48:52 +0800 Subject: [PATCH] 初始化项目 --- pages/product/pick/ifsLocationList.vue | 132 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 132 insertions(+), 0 deletions(-) diff --git a/pages/product/pick/ifsLocationList.vue b/pages/product/pick/ifsLocationList.vue new file mode 100644 index 0000000..8b2e422 --- /dev/null +++ b/pages/product/pick/ifsLocationList.vue @@ -0,0 +1,132 @@ +<template> + <view class="wrap"> + <view> + <view class="search"> + <u-search v-model="query.locationDesc" @custom="search" @search="search" placeholder="搴撲綅鎻忚堪"></u-search> + </view> + <scroll-view class="scroll-list" scroll-y="true"> + <u-cell-group class="list" :border="false"> + <view class="content" v-for="(item, index) in locationList" :key="item.id" :index="index" @click="locationCardClick(item)"> + <view class="row-list location-row"> + <span class="span-lable">搴撲綅鍙�: </span>{{ item.locationNo }} + </view> + <view class="row-list location-row"> + <span class="span-lable">浠撳簱: </span>{{ item.warehouseDesc }} + </view> + <view class="row-list location-row"> + <span class="span-lable">搴撲綅鎻忚堪: </span>{{ item.locationDesc }} + </view> + <view class="row-list location-row"> + <span class="span-lable">搴撲綅绫诲瀷: </span>{{ item.locationTypeDesc }} + </view> + </view> + <view v-if="locationList.length===0"> + <view style="text-align: center;"> + <span>鏈煡璇㈠埌IFS搴撲綅璁板綍</span> + </view> + </view> + </u-cell-group> + </scroll-view> + </view> + <!--<view style="position: absolute;bottom: 0"> + <view style="height: 50rpx;display: flex;align-items: flex-end;"> + <u-button type="success" text="搴撲綅鎵爜" size="medium" + :customStyle="{width:'750rpx',borderRadius:'0rpx'}" @click="scanLocationCodeClick()">搴撲綅鎵爜 + </u-button> + </view> + </view>--> + </view> +</template> +<script> + export default { + data() { + return { + locationList: [], + originList: [], + query:{locationDesc:''} + }; + }, + onLoad() { + this.loadList(); + }, + onShow() { + + }, + methods: { + loadList() { + // 鏌ヨ搴撲綅鍒楄〃 + this.$u.api.ifsLocation.page(this.query).then(res => { + let _code =res.code + let _data =res.data + if(_code===0){ + this.locationList = _data.map((item, index) => { + return { + id: index + 1, + locationNo: item.LOCATION_NO, + locationDesc: item.LOCATION_DESC, + locationGroupDesc: item.LOCATION_GROUP_DESC, + locationTypeDesc: item.LOCATION_TYPE_DESC, + warehouseDesc: item.WAREHOUSE_DESC + } + }) + }else{ + this.locationList=[] + } + }) + }, + search(value){ + this.locationList = []; + this.query.locationDesc = value; + this.loadList(); + }, + scanLocationCodeClick() { + uni.scanCode({ + scanType: ['qrCode'], + success: function(res) { + console.log('鏉$爜绫诲瀷锛�' + res.scanType); + console.log('鏉$爜鍐呭锛�' + res.result); + }, + fail: function() { + console.log('鎵爜澶辫触'); + } + }); + }, + locationCardClick(task) { + this.refreshLastPage(task) + }, + + //鍒锋柊涓婁竴涓〉闈� + refreshLastPage(task) { + // 鍛婄煡 A.vue 鏇存柊鏁版嵁 + // 鑾峰彇椤甸潰鏍� + let pages = getCurrentPages() + + // 鑾峰彇涓婁竴椤垫爤 + let prevPage = pages[pages.length - 2] + + // 瑙﹀彂涓婁竴椤� upData 鍑芥暟(骞舵惡甯﹀弬鏁�) + prevPage.$vm.setMaterialLocation(task) + + // 杩斿洖涓婁竴椤� + uni.navigateBack({ + delta: 1 + }) + }, + } + }; +</script> +<style lang="scss"> + .list .content { + font-size: 12px; + background-color: #efefef; + box-sizing: border-box; + border-radius: 14rpx; + margin: 8px; + padding: 5px 10px; + box-shadow: none; + } + .location-row{ + display: flex; + justify-content:space-between; + } +</style> -- Gitblit v1.9.3