maliang 4 недель назад
Родитель
Сommit
bed02e5a00

+ 3 - 3
components/goods-pop/goods-pop.vue

@@ -35,14 +35,14 @@
 									<view class="num-box">
 										<view class="num-box-text" v-if="type == 'caigou'">入库数量</view>
 										<view class="num-box-text" v-else>出库数量</view>
-										<u-number-box v-model="item.numberVal">
-											<view slot="minus" class="minus">
+										<u-number-box v-model="item.numberVal" :inputWidth="56" :min="0">
+											<!-- <view slot="minus" class="minus">
 												<u-icon name="minus" color="#0256FF" size="12"></u-icon>
 											</view>
 											<text slot="input" class="input">{{item.numberVal}}</text>
 											<view slot="plus" class="plus">
 												<u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
-											</view>
+											</view> -->
 										</u-number-box>
 									</view>
 								</good-item>

+ 3 - 3
components/scaned-pop/scaned-pop.vue

@@ -7,14 +7,14 @@
 				</view>
 				<view class="tips-value">请确认该商品出库数量</view>
 				<view class="num-box">
-						<u-number-box v-model="numberVal">
-							<view slot="minus" class="minus">
+						<u-number-box v-model="numberVal" :inputWidth="56" :min="0">
+							<!-- <view slot="minus" class="minus">
 								<u-icon name="minus" color="#0256FF" size="12"></u-icon>
 							</view>
 							<text slot="input" class="input">{{numberVal}}</text>
 							<view slot="plus" class="plus">
 								<u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
-							</view>
+							</view> -->
 						</u-number-box>
 					</view>
 				</good-item>

+ 118 - 0
pages/inventory-inquiry/components/good-item.vue

@@ -0,0 +1,118 @@
+<template>
+  <view>
+    <view class="good-item" @click="toDetail">
+      <view class="good-msg">
+        <u-image
+          :src="item.imgNameArr[0] || ''"
+          width="128rpx"
+          height="128rpx"
+        ></u-image>
+        <view class="ss-m-l-16">
+          <view class="good-msg-name">{{ item.materialName }}</view>
+          <view class="good-msg-txm">条形码:{{ item.barCode }}</view>
+        </view>
+      </view>
+      <view class="good-cont">
+        <view class="good-cont-item">
+          <view class="item-label">规格</view>
+          <view class="item-value">{{ item.materialStandard || "-" }}</view>
+        </view>
+        <view class="good-cont-item">
+          <view class="item-label">批次号</view>
+          <view class="item-value">{{ item.batchNumber || "-" }}</view>
+        </view>
+        <view class="good-cont-item" @click.stop="calendarClick">
+          <view class="item-label">生产日期</view>
+          <view class="item-value">{{
+            item.productionDate
+              ? $u.timeFormat(item.productionDate, "yyyy-mm-dd")
+              : "-"
+          }}</view>
+        </view>
+        <view class="good-cont-item">
+          <view class="item-label">库存</view>
+          <view class="item-value"
+            >{{ item.inventory ? (item.inventory * 1).toFixed(0) : "0"
+            }}{{ item.commodityUnit || "" }}</view
+          >
+        </view>
+        <view class="good-cont-item">
+          <view class="item-label">库位</view>
+          <view class="item-value">{{ item.position || "-" }}</view>
+        </view>
+      </view>
+      <slot></slot>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  data() {
+    return {
+      calendarShow: false,
+      value1: Number(new Date()),
+      maxDate: Number(new Date()),
+    };
+  },
+  methods: {
+    toDetail() {
+      this.$emit("toDetail", this.item);
+    },
+    calendarClick() {
+      this.$emit("calendarClick", this.item);
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.good-item {
+  padding: 24rpx 0;
+  border-bottom: 4rpx solid #f0f6fb;
+  .good-msg {
+    display: flex;
+    align-items: center;
+    padding: 0 24rpx;
+    &-name {
+      color: #333;
+      font-family: "PingFang SC";
+      font-size: 28rpx;
+      font-weight: 500;
+      margin-bottom: 16rpx;
+    }
+    &-txm {
+      color: #999;
+      font-family: "PingFang SC";
+      font-size: 28rpx;
+      font-weight: 400;
+    }
+  }
+  .good-cont {
+    display: grid;
+    grid-template-columns: 25% 45% 30%;
+    margin-top: 16rpx;
+    padding: 0 24rpx;
+    &-item {
+      font-family: "PingFang SC";
+      font-weight: 400;
+      margin-bottom: 24rpx;
+      .item-label {
+        color: #999;
+        font-size: 24rpx;
+        margin-bottom: 16rpx;
+      }
+      .item-value {
+        color: #000;
+        font-size: 28rpx;
+      }
+    }
+  }
+}
+</style>

+ 20 - 7
pages/inventory-inquiry/index.vue

@@ -76,11 +76,20 @@
               <block v-for="(item, i) in goodsList" :key="i">
                 <good-item :item="item"></good-item>
               </block>
-							<block v-if="goodsList.length == 0">
-								<u-empty mode="data" text="暂无内容" marginTop="60" icon="https://xiangli-erp.oss-cn-hangzhou.aliyuncs.com/APP/no-notifcations.png"></u-empty>
-							</block>
+              <block v-if="goodsList.length == 0">
+                <u-empty
+                  mode="data"
+                  text="暂无内容"
+                  marginTop="60"
+                  icon="https://xiangli-erp.oss-cn-hangzhou.aliyuncs.com/APP/no-notifcations.png"
+                ></u-empty>
+              </block>
               <!-- 加载更多 -->
-              <u-loadmore v-if="goodsList.length > 0" :status="loadStatus" @loadmore="onLoadMore" />
+              <u-loadmore
+                v-if="goodsList.length > 0"
+                :status="loadStatus"
+                @loadmore="onLoadMore"
+              />
             </scroll-view>
           </view>
         </view>
@@ -103,7 +112,7 @@ import {
   inventoryPositionTree,
   materialCategoryTree,
 } from "@/common/request/apis/inventoryInquiry";
-import goodItem from "@/components/good-item/good-item.vue";
+import goodItem from "./components/good-item.vue";
 export default {
   components: {
     goodItem,
@@ -180,7 +189,7 @@ export default {
   },
   onShow() {
     uni.$on("scanFinish", (data) => {
-      this.params.keyword = data;
+      this.queryParams.keyword = data;
       this.onRefresh();
     });
   },
@@ -239,12 +248,16 @@ export default {
           ...this.queryParams,
         };
         const res = await inventoryInquiry(params);
+				console.log("inventoryInquiry====", params);
         console.log("res====", res);
         const { rows, total } = res.data;
         const list = rows.map((item) => {
           return {
             ...item,
-            imgNameArr: item.imgName && item.imgName.length >0 ? item.imgName.split(",") : [],
+            imgNameArr:
+              item.imgName && item.imgName.length > 0
+                ? item.imgName.split(",")
+                : [],
           };
         });
         this.goodsList = [...this.goodsList, ...list];

+ 184 - 0
pages/picking-task/components/task-item.vue

@@ -0,0 +1,184 @@
+<template>
+  <view class="task-item">
+    <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-yellow" v-if="item.status == 4">拣货中</view>
+        </view>
+      </view>
+      <view class="task-line" v-if="type == 'caigou'">
+        <view>供应商:</view>
+        <view>{{ item.supplierName }}</view>
+      </view>
+      <view class="task-line" v-else>
+        <view>客户名称:</view>
+        <view>{{ item.supplierName }}</view>
+      </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">
+      <view v-if="type == 'caigou'">
+        <view
+          class="btn btn-1"
+          v-if="item.status == 1 || item.status == 4"
+          @click="toStorage"
+          >去入库</view
+        >
+        <view class="btn btn-2" v-else @click="toDetail">详情</view>
+      </view>
+      <view v-else>
+        <view
+          class="btn btn-1"
+          v-if="item.status == 1 || item.status == 4"
+          @click="toStorage"
+          >去出库</view
+        >
+        <view class="btn btn-2" v-else @click="toDetail">详情</view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    item: {
+      type: Object,
+      default: () => {},
+    },
+    type: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {};
+  },
+  methods: {
+    toStorage() {
+      this.$emit("toStorage", this.item);
+    },
+    toDetail() {
+      this.$emit("toDetail", this.item);
+    },
+    detailClick() {
+      if (this.item.status == 1 || this.item.status == 4) {
+        this.toStorage();
+      } else {
+        this.toDetail();
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.task-item {
+  width: 100%;
+  background-color: #fff;
+  border-radius: 16rpx;
+  padding: 24rpx 24rpx 0;
+  margin-bottom: 24rpx;
+  .task-head {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .sn-box {
+      color: #333;
+      font-family: "PingFang SC";
+      font-size: 28rpx;
+      font-weight: 500;
+    }
+    .tips {
+      font-family: "PingFang SC";
+      font-size: 22rpx;
+      font-weight: 400;
+      width: 120rpx;
+      height: 44rpx;
+      border-radius: 8rpx;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+    .tips-red {
+      color: #ff3b1d;
+      background: rgba(255, 59, 29, 0.2);
+    }
+    .tips-greed {
+      color: #00b97b;
+      background: rgba(0, 185, 123, 0.2);
+    }
+    .tips-yellow {
+      color: #f57701;
+      background: rgba(245, 151, 1, 0.2);
+    }
+  }
+
+  .task-line {
+    display: flex;
+    align-items: center;
+    color: #666;
+    font-family: "PingFang SC";
+    font-size: 28rpx;
+    font-weight: 400;
+    margin-top: 16rpx;
+  }
+  .task-line2 {
+    width: 50%;
+    display: flex;
+    align-items: center;
+    .task-num {
+      color: #0256ff;
+    }
+  }
+
+  .task-bottom {
+    border-top: 1px solid #f0f0f0;
+    margin-top: 32rpx;
+    height: 104rpx;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    .btn {
+      width: 144rpx;
+      height: 56rpx;
+      border-radius: 8rpx;
+      font-size: 28rpx;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-family: "PingFang SC";
+    }
+    .btn-1 {
+      background: #0256ff;
+      color: #fff;
+    }
+    .btn-2 {
+      border: 1px solid #0256ff;
+      background: rgba(2, 86, 255, 0.2);
+      color: #0256ff;
+    }
+  }
+}
+</style>

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

@@ -29,12 +29,12 @@
 						{{orderInfo.subType || '-'}}
 					</view>
 				</view>
-				<view class="info-line">
+				<view class="info-line" v-if="orderInfo.submitTime">
 					<view class="info-line-label">
 						<text>出库日期</text>
 					</view>
 					<view class="info-line-value">
-						{{orderInfo.operTime || '-'}}
+						{{orderInfo.submitTime || '-'}}
 					</view>
 				</view>
 				<view class="info-line">
@@ -93,14 +93,14 @@
 					<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" min="0">
-								<view slot="minus" class="minus">
+							<u-number-box v-model="item.materialNumber" min="0" :inputWidth="56">
+								<!-- <view slot="minus" class="minus">
 									<u-icon name="minus" color="#0256FF" size="12"></u-icon>
 								</view>
 								<text slot="input" class="input">{{item.materialNumber}}</text>
 								<view slot="plus" class="plus">
 									<u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
-								</view>
+								</view> -->
 							</u-number-box>
 						</view>
 					</good-item>

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

@@ -82,7 +82,7 @@
 						<text>出库时间</text>
 					</view>
 					<view class="info-line-value">
-						{{orderInfo.operTime}}
+						{{orderInfo.submitTime}}
 					</view>
 				</view>
 				

+ 1 - 1
pages/picking-task/index.vue

@@ -49,7 +49,7 @@
 <script>
 	var main, receiver, filter;
 	var _codeQueryTag = false;
-	import taskItem from '@/components/task-item/task-item.vue'
+	import taskItem from './components/task-item.vue'
 	import {saleOrder} from '@/common/request/apis/picking'
 	import {orderStartHandle, depotSpinnerList} from '@/common/request/apis/purchase'
 	export default{

BIN
static/image/home/avatar.png