Ver código fonte

最新版本

hi 1 mês atrás
pai
commit
69519bf56c

+ 1 - 1
common/request/apis/picking.js

@@ -1,3 +1,3 @@
 // 拣货任务
-export const saleOrder = (params, config = {custom: { auth: true }}) => uni.$u.http.post(`/pda/saleOrder`, params, config)
+export const saleOrder = (params, config = {custom: { auth: true }}) => uni.$u.http.post(`/pda/saleOrder?currentPage=${params.currentPage}&pageSize=${params.pageSize}`, params, config)
 // export const bannerList = (params, config = {}) => uni.$u.http.get(`/1`, {params, config, custom: { auth: false }})

+ 1 - 1
common/request/apis/purchase.js

@@ -1,5 +1,5 @@
 // 采购入库
-export const purchaseInventory = (params, config = {custom: { auth: true }}) => uni.$u.http.post(`/pda/purchaseInventory`, params, config)
+export const purchaseInventory = (params, config = {custom: { auth: true }}) => uni.$u.http.post(`/pda/purchaseInventory?currentPage=${params.currentPage}&pageSize=${params.pageSize}`, params, config)
 // 订单明细
 export const orderDetail = (urlparams, config = {custom: { auth: true }}) => uni.$u.http.get(`/pda/orderDetail/${urlparams}`, config)
 // 订单明细上部

+ 3 - 3
pages/goods/detail.vue

@@ -125,7 +125,7 @@
 			return {
 				navTitle:'哇哈哈AD盖',
 				goodsId:0,//单据id
-				materialId:0,//商品id
+				// materialId:0,//商品id
 				crkShow: false,
 				currentCrkId:'out',
 				crkList:[
@@ -145,7 +145,7 @@
 		onLoad(e) {
 			this.navTitle = e.name ? decodeURIComponent(e.name) : ''
 			this.goodsId = e.id
-			this.materialId = e.materialId
+			// this.materialId = e.materialId
 			this.getMaterialDetail()
 		},
 		methods:{
@@ -171,7 +171,7 @@
 				uni.showLoading()
 				let urlParams = {
 					type:this.currentCrkId,
-					materialId:this.materialId,
+					materialId:this.goodsInfo.materialId,
 				}
 				let data = {pageNum:1,pageSize:10}
 				materialDepotDetail(urlParams,data)

+ 1 - 1
pages/inventory-inquiry/index.vue

@@ -241,7 +241,7 @@ export default {
         const list = rows.map((item) => {
           return {
             ...item,
-            src: item.imgName,
+            imgNameArr: item.imgName && item.imgName.length >0 ? item.imgName.split(",") : [],
           };
         });
         this.goodsList = [...this.goodsList, ...list];

+ 1 - 1
pages/inventory-task/components/categoryPopup.vue

@@ -127,7 +127,7 @@ export default {
     onConfirm() {
       console.log(999000);
       if (!this.formData.newLocation) {
-        uni.$u.toast("请输入新库");
+        uni.$u.toast("请输入新库");
         return;
       }
       this.$emit("confirm", this.formData.newLocation);

+ 0 - 4
pages/inventory-task/detail.vue

@@ -408,11 +408,8 @@ export default {
       this.actionPop.showCategoryPop = true;
       this.actionPop.activeGoodsItem = { ...item };
       this.actionPop.originalLocation = item.position;
-      console.log("handlePositionEdit======", item);
-      console.log("userInfo======", this.userInfo);
     },
     async haandleComfirmLocation(val) {
-      console.log("haandleComfirmLocation======", val);
       const activeGoodsItem = this.actionPop.activeGoodsItem;
       try {
         const params = {
@@ -421,7 +418,6 @@ export default {
           newPosition: val,
         };
         const res = await stocktaking(params);
-        console.log("res----------", res);
         if (res.code === 200) {
           uni.$u.toast(res.msg);
           this.onRefresh();

+ 3 - 3
pages/picking-task/delivery.vue

@@ -78,10 +78,10 @@
 						<text>连续扫描</text>
 					</view>
 				</view>
-				<view class="scan-box-r" @click="manualClick">
+				<!-- <view class="scan-box-r" @click="manualClick">
 					<u-image width="120rpx" height="120rpx" src="@/static/image/shoudong-saoma-img.png"></u-image>
 					<view class="tips-text">手动选择</view>
-				</view>
+				</view> -->
 			</view>
 			<!-- 货物清单 -->
 			<view class="cargo-list">
@@ -428,7 +428,7 @@
 				}
 
 				.scan-box-l {
-					width: 50%;
+					width: 100%;
 					display: flex;
 					flex-direction: column;
 					align-items: center;

+ 9 - 1
pages/picking-task/detail.vue

@@ -109,7 +109,7 @@
 								<view slot="minus" class="minus">
 									<u-icon name="minus" color="#DADADA" size="12"></u-icon>
 								</view>
-								<text slot="input" class="input">{{item.actualQuantityInStorage || 0}}</text>
+								<text slot="input" class="input">{{(item.actualQuantityInStorage * 1).toFixed(0) || 0}}</text>
 								<view slot="plus" class="plus">
 									<u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
 								</view>
@@ -156,6 +156,14 @@
 			orderDetail(id)
 			.then(res=>{
 				if(res.code == 200) {
+					res.data.rows.forEach(item=>{
+						if(item.imgName && item.imgName.length >0) {
+							item.imgNameArr = item.imgName.split(",")
+						}else {
+							item.imgNameArr = []
+						}
+						item.materialNumber = 0
+					})
 					this.goodsList = res.data.rows
 				}
 			})

+ 20 - 4
pages/picking-task/index.vue

@@ -32,7 +32,8 @@
 				<block v-for="(item,i) in taskList" :key="i">
 					<task-item :item="item" @toStorage="toStorage" @toDetail="toDetail"></task-item>
 				</block>
-					<u-empty mode="data" v-if="taskList.length == 0"></u-empty>
+				<u-loadmore v-if="taskList.length > 0" :status="status" />
+				<u-empty mode="data" v-if="taskList.length == 0"></u-empty>
 			</view>
 		</view>
 		<!-- 中心仓弹窗 -->
@@ -94,9 +95,11 @@
 					endTime:'',
 					number:'',
 					status:'',
-					pageNum:1,
+					currentPage:1,
 					pageSize:10
-				}
+				},
+				status:'loadmore',
+				lastPage:1,
 			}
 		},
 		onLoad() {
@@ -111,6 +114,12 @@
 		onUnload() {
 			uni.$off('scanFinish')
 		},
+		onReachBottom() {
+			if(this.params.currentPage < this.lastPage) {
+				this.params.currentPage ++
+				this.getSaleOrder()
+			}
+		},
 		onShow() {
 			uni.$on('scanFinish',(data)=>{
 				this.params.number = data
@@ -146,7 +155,14 @@
 				saleOrder(this.params)
 				.then(res=>{
 					if(res.code == 200) {
-						this.taskList = res.data.rows;
+						this.status = 'loading';
+						this.lastPage =  Math.ceil(res.data.total * 1 / this.params.pageSize)
+						if(this.params.currentPage < this.lastPage) {
+							this.status = 'loadmore'
+						}else {
+							this.status = 'nomore'
+						}
+						this.taskList =[...this.taskList,...res.data.rows];
 					}
 					uni.hideLoading()
 				})

+ 20 - 4
pages/purchase/index.vue

@@ -32,6 +32,7 @@
 				<block v-for="(item,i) in taskList" :key="i">
 					<task-item :item="item" @toStorage="toStorage" @toDetail="toDetail" type="caigou"></task-item>
 				</block>
+				<u-loadmore v-if="taskList.length > 0" :status="status" />
 				<u-empty mode="data" v-if="taskList.length == 0"></u-empty>
 			</view>
 		</view>
@@ -93,9 +94,11 @@
 					endTime:'',
 					number:'',
 					status:'',
-					pageNum:1,
+					currentPage:1,
 					pageSize:10
-				}
+				},
+				status:'loadmore',
+				lastPage:1,
 			}
 		},
 		onLoad() {
@@ -120,13 +123,19 @@
 		onUnload() {
 			uni.$off('scanFinish')
 		},
+		onReachBottom() {
+			if(this.params.currentPage < this.lastPage) {
+				this.params.currentPage ++
+				this.getPurchaseInventory()
+			}
+		},	
 		methods:{
 			scanCode() {
 				this.$scan.scanCode()
 			},
 			init() {
 				uni.showLoading()
-				this.params.pageNum = 1
+				this.params.currentPage = 1
 				this.getPurchaseInventory()
 			},
 			searchClick() {
@@ -156,7 +165,14 @@
 				purchaseInventory(this.params)
 				.then(res=>{
 					if(res.code == 200) {
-						this.taskList = res.data.rows;
+						this.status = 'loading';
+						this.lastPage =  Math.ceil(res.data.total * 1 / this.params.pageSize)
+						if(this.params.currentPage < this.lastPage) {
+							this.status = 'loadmore'
+						}else {
+							this.status = 'nomore'
+						}
+						this.taskList =[...this.taskList,...res.data.rows];
 					}
 					uni.hideLoading()
 				})

+ 3 - 3
pages/purchase/put-storage.vue

@@ -70,10 +70,10 @@
 						<text>连续扫描</text>
 					</view>
 				</view>
-				<view class="scan-box-r" @click="manualClick">
+				<!-- <view class="scan-box-r" @click="manualClick">
 					<u-image width="120rpx" height="120rpx" src="@/static/image/shoudong-saoma-img.png"></u-image>
 					<view class="tips-text">手动选择</view>
-				</view>
+				</view> -->
 			</view>
 			<!-- 货物清单 -->
 			<view class="cargo-list">
@@ -430,7 +430,7 @@
 				}
 
 				.scan-box-l {
-					width: 50%;
+					width: 100%;
 					display: flex;
 					flex-direction: column;
 					align-items: center;