hi 1 mês atrás
pai
commit
b460fc8f8c

+ 1 - 1
components/good-item/good-item.vue

@@ -3,7 +3,7 @@
 		<view class="good-item" @click="toDetail">
 			<view class="good-msg">
 				<u-image
-					:src="item.src"
+					:src="item.imgNameArr[0] || ''"
 					width="128rpx"
 					height="128rpx"
 				></u-image>

+ 38 - 29
components/task-item/task-item.vue

@@ -1,38 +1,40 @@
 <template>
 	<view class="task-item">
-		<view class="task-head">
-			<view class="sn-box">单据编号:{{item.number}}</view>
-			<view v-if="type == 'caigou'">
-				<view class="tips tips-red" v-if="item.status == 1">待入库</view>
-				<view class="tips tips-greed" v-if="item.status == 2">已入库</view>
-				<view class="tips tips-yellow" v-if="item.status == 4">入库中</view>
+		<view @click="detailClick">
+			<view class="task-head">
+				<view class="sn-box">单据编号:{{item.number}}</view>
+				<view v-if="type == 'caigou'">
+					<view class="tips tips-red" v-if="item.status == 1">待入库</view>
+					<view class="tips tips-greed" v-if="item.status == 2">已入库</view>
+					<view class="tips tips-yellow" v-if="item.status == 4">入库中</view>
+				</view>
+				<view v-else>
+					<view class="tips tips-red" v-if="item.status == 1">待拣货</view>
+					<view class="tips tips-greed" v-if="item.status == 2">已拣货</view>
+					<view class="tips tips-greed" v-if="item.status == 4">拣货中</view>
+				</view>
 			</view>
-			<view v-else>
-				<view class="tips tips-red" v-if="item.status == 1">待拣货</view>
-				<view class="tips tips-greed" v-if="item.status == 2">已拣货</view>
-				<view class="tips tips-greed" v-if="item.status == 4">拣货中</view>
+			<view class="task-line" v-if="type == 'caigou'">
+				<view>供应商:</view>
+				<view>{{item.supplierName}}</view>
 			</view>
-		</view>
-		<view class="task-line" v-if="type == 'caigou'">
-			<view>供应商:</view>
+			<view class="task-line" v-else>
+			<view>客户名称:</view>
 			<view>{{item.supplierName}}</view>
-		</view>
-		<view class="task-line" v-else>
-		<view>客户名称:</view>
-		<view>快马阳光便利店</view>
-		</view>
-		<view class="task-line">
-			<view>单据日期:</view>
-			<view>{{item.createTime}}</view>
-		</view>
-		<view class="task-line">
-			<view class="task-line2">
-				<view>货物总数:</view>
-				<view class="task-num">{{item.goodsQuantity}}件</view>
 			</view>
-			<view class="task-line2">
-				<view>货物种类:</view>
-				<view class="task-num">{{item.goodsTypeCount}}件</view>
+			<view class="task-line">
+				<view>单据日期:</view>
+				<view>{{item.operTime}}</view>
+			</view>
+			<view class="task-line">
+				<view class="task-line2">
+					<view>货物总数:</view>
+					<view class="task-num">{{item.goodsQuantity}}件</view>
+				</view>
+				<view class="task-line2">
+					<view>货物种类:</view>
+					<view class="task-num">{{item.goodsTypeCount || 0}}件</view>
+				</view>
 			</view>
 		</view>
 		<view class="task-bottom">
@@ -71,6 +73,13 @@
 			},
 			toDetail() {
 				this.$emit('toDetail',this.item)
+			},
+			detailClick() {
+				if(this.item.status == 1 || this.item.status == 4) {
+					this.toStorage()
+				}else {
+					this.toDetail()
+				}
 			}
 		}
 	}

+ 6 - 1
pages/goods/detail.vue

@@ -26,7 +26,7 @@
 						<text>货物图片</text>
 					</view>
 					<view class="info-line-value ss-p-y-24">
-						<u-image src="" width="120rpx" height="120rpx"></u-image>
+						<u-image :src="goodsInfo.imgNameArr[0] || ''" width="120rpx" height="120rpx"></u-image>
 					</view>
 				</view>
 				<view class="info-line">
@@ -157,6 +157,11 @@
 				materialDetail(this.goodsId)
 				.then(res=>{
 					if(res.code == 200) {
+						if(res.data.imgName && res.data.imgName.length >0) {
+							res.data.imgNameArr = res.data.imgName.split(",")
+						}else {
+							res.data.imgNameArr = []
+						}
 						this.goodsInfo = res.data
 					}
 				})

+ 65 - 3
pages/inventory-task/detail.vue

@@ -17,6 +17,19 @@
 
     <u-sticky bgColor="#F5F6F7" :offsetTop="offsetTop">
       <!-- 基本信息 吸顶 -->
+			<view class="search-box">
+			  <u-search
+			    placeholder="输入货物名称/库位/条码/内部编码"
+			    shape="square"
+			    :showAction="false"
+			    @search="onRefresh"
+			    @clear="onRefresh"
+			    v-model="queryFilterValues.number"
+			  ></u-search>
+			  <view class="scan-icon flex_box flex_row_center" @click="scanCode">
+			    <image src="@/static/image/scan-icon-2.png" mode=""></image>
+			  </view>
+			</view>
       <view class="info-card">
         <view class="info-item page-title">
           {{ inventoryInfo.taskName }}
@@ -87,7 +100,7 @@
         <view class="goods-content">
           <image
             class="goods-image"
-            :src="item.image"
+            :src="item.imgNameArr[0] || ''"
             mode="aspectFill"
           ></image>
           <view class="goods-info">
@@ -267,6 +280,7 @@ export default {
         userIdList: [], // 盘点负责人id
         categoryIdList: [], // 类目
         positionList: [], // 库位
+				number:''
       },
       actionPop: {
         // 盘点数量弹框状态
@@ -304,6 +318,18 @@ export default {
     this.taskId = opt.id;
     this.loadData(opt.id);
   },
+	onShow() {
+	  uni.$on("scanFinish", (data) => {
+	    this.queryFilterValues.number = data;
+	    this.onRefresh();
+	  });
+	},
+	onHide() {
+	  uni.$off("scanFinish");
+	},
+	onUnload() {
+	  uni.$off("scanFinish");
+	},
   onPullDownRefresh() {
     // 下拉刷新
     this.onRefresh();
@@ -341,6 +367,13 @@ export default {
         };
         const res = await taskStocktakingItemList(params);
         const { total, rows } = res.data;
+				rows.forEach(item=>{
+					if(item.imgName && item.imgName.length >0) {
+						item.imgNameArr = item.imgName.split(",")
+					}else {
+						item.imgNameArr = []
+					}
+				})
         this.goodsList = [...this.goodsList, ...rows];
         if (pageNum * pageSize < Number(total)) {
           this.pageNum++;
@@ -348,7 +381,6 @@ export default {
         } else {
           this.loadStatus = "nomore";
         }
-        console.log("taskStocktakingItemList======", res);
       } catch (error) {}
     },
     // 任务详情
@@ -432,6 +464,9 @@ export default {
       this.filterPopupVisible = false;
       this.onRefresh();
     },
+		scanCode() {
+		  this.$scan.scanCode();
+		},
   },
 };
 </script>
@@ -445,7 +480,34 @@ export default {
   .nav-right {
     padding: 0 24rpx;
   }
-
+	
+	.search-box {
+	  background-color: rgba(191, 200, 219, 0.2);
+	  margin: 0 32rpx;
+	  display: flex;
+	  align-items: center;
+	  justify-content: space-between;
+	  border-radius: 8rpx;
+	
+	  ::v-deep .u-search__content {
+	    background-color: transparent !important;
+	
+	    .u-search__content__input {
+	      background-color: transparent !important;
+	    }
+	  }
+	
+	  .scan-icon {
+	    width: 100rpx;
+	    height: 100%;
+	
+	    image {
+	      width: 40rpx;
+	      height: 40rpx;
+	    }
+	  }
+	}
+	
   .info-card {
     background-color: #fff;
     padding: 16rpx 32rpx;

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

@@ -92,8 +92,8 @@
 				<block v-for="(item,i) in goodsList" :key="i">
 					<good-item :item="item" @toDetail="toDetail">
 						<view class="num-box" @click.stop="">
-							<view class="num-box-text">已确认拣货数量</view>
-							<u-number-box v-model="item.materialNumber">
+							<view class="num-box-text">已确认出库数量</view>
+							<u-number-box v-model="item.materialNumber" min="0">
 								<view slot="minus" class="minus">
 									<u-icon name="minus" color="#0256FF" size="12"></u-icon>
 								</view>

+ 7 - 0
pages/purchase/detail.vue

@@ -165,6 +165,13 @@
 				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 = []
+							}
+						})
 						this.goodsList = res.data.rows
 					}
 				})

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

@@ -85,7 +85,7 @@
 					<good-item :item="item" @toDetail="toDetail" @calendarClick="calendarClick">
 						<view class="num-box">
 							<view class="num-box-text">已确认入库数量</view>
-							<u-number-box v-model="item.materialNumber">
+							<u-number-box v-model="item.materialNumber" min="0">
 								<view slot="minus" class="minus">
 									<u-icon name="minus" color="#0256FF" size="12"></u-icon>
 								</view>