chenrui 3 years ago
parent
commit
833ec77861

+ 8 - 0
api/shelf.js

@@ -10,4 +10,12 @@ export const getShelfList = (params) => {
 		data: params,
 		method: 'post'
 	})
+}
+//  货架  货位产品 列表 不分页
+export const shelfProductList = (params) => {
+  return axios.request({
+    url: `shelf/placeProduct/queryList`,
+    data: params,
+    method: 'post'
+  })
 }

+ 1 - 1
pages/latePlay/chooseBulk.vue

@@ -121,7 +121,7 @@
 			},
 			viewDetail(item){
 				uni.navigateTo({
-					url: "/pages/latePlay/chooseProduct?id="+item.id
+					url: "/pages/latePlay/chooseProduct?shelfSn="+item.shelfSn+'&shelfName='+item.shelfName
 				})
 			}
 		}

+ 22 - 13
pages/latePlay/chooseProduct.vue

@@ -14,28 +14,26 @@
 			</u-search>
 			<view class="p-title">
 				<text></text>
-				西安车领主常青二路数字货架
+				{{shelfInfo.shelfName}}
 			</view>
 		</view>
 		<view class="moreShelfPart-body">
-			<scroll-view
-			class="nav-right" 
-			scroll-y 
-			@scrolltolower="onreachBottom">
+			<scroll-view class="nav-right" scroll-y @scrolltolower="onreachBottom">
 				<view class="partList-list-box" v-for="item in partList" :key="item.id">
 					<view class="product flex align_center">
 						<view class="flex align_center flex_1">
 							<view class="pimgs">
-								<u-image width="128" height="128" border-radius="10"></u-image>
+								<u-image :src="item.shelfProductApiEntity&&item.shelfProductApiEntity.productMsg?item.shelfProductApiEntity.productMsg:`../../static/${theme}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
 							</view>
 							<view class="pinfo">
 								<view class="pname">
-									<text class="pno">A10</text>
-									箭牌机油滤清器10款进口大众途锐 5.0L V10 TDI
+									<!-- <text class="pno">A10</text>
+									箭牌机油滤清器10款进口大众途锐 5.0L V10 TDI -->
+									{{item.shelfProductApiEntity&&item.shelfProductApiEntity.productName}}
 								</view>
 								<view class="ptxt flex align_center justify_between">
 									<view>
-										<text class="pcode">JB-11066A</text>
+										<text class="pcode">{{item.shelfProductApiEntity&&item.shelfProductApiEntity.productCode}}</text>
 									</view>
 									<view>
 									  库存数量:<text class="pnums">3个</text>
@@ -63,7 +61,7 @@
 </template>
 
 <script>
-	import { getShelfList } from '@/api/shelf'
+	import { shelfProductList } from '@/api/shelf'
 	export default {
 		data() {
 			return {
@@ -75,10 +73,20 @@
 				total: 0, // 列表总数
 				noDataText: '暂无货架',
 				status: 'loading',
-				vinstatus: 'loading'
+				vinstatus: 'loading',
+				shelfInfo: {
+					shelfSn: '',
+					shelfName: ''
+				},
+				theme: '',
 			}
 		},
-		onLoad(opts) {
+		onLoad(options) {
+			this.theme = getApp().globalData.theme
+			this.shelfInfo = {
+				shelfSn: options.shelfSn,
+				shelfName: options.shelfName
+			}
 			this.getpartList()
 		},
 		methods: {
@@ -100,10 +108,11 @@
 				let params = {
 				    pageNo: this.pageNo,
 				    pageSize: this.pageSize,
+					shelfSn: this.shelfInfo.shelfSn,
 					queryWord: this.queryWord
 				}
 				_this.status = 'loading'
-				getShelfList(params).then(res => {
+				shelfProductList(params).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
 						let list = res.data.list

+ 2 - 2
pages/replenishmentManage/scanCodePrint.vue

@@ -28,7 +28,7 @@
 		},
 		onReady() {
 			// 初始化摄像头
-			// this.init()
+			this.init()
 		},
 		onLoad(options) {
 			this.replenishBillSn = options.replenishBillSn
@@ -79,7 +79,7 @@
 			init(){
 				const _this = this
 				// 初始化
-				this.barcode = plus.barcode.create('barcode', ['EAN13'], {
+				this.barcode = plus.barcode.create('barcode', [], {
 					top:'0px',
 					left:'0px',
 					width: '100%',