lilei 1 vuosi sitten
vanhempi
commit
06f878b1cc

+ 15 - 0
config/api.js

@@ -121,3 +121,18 @@ export const stockFlowList = (params, config = {}) => http.post(`/stockFlow/quer
 export const querySumByProductLocation = (params, config = {}) => http.post(`/stock/detail/querySumByProductLocation/${params.pageNo}/${params.pageSize}`, params, config)
 //  出入库明细  列表  合计
 export const stockByProductSn = (params, config = {}) => http.post(`/stock/findByProductSn/${params.productSn}`, params, config)
+
+//  签收入库 列表  有分页
+export const receivingStockList = (params, config = {}) => http.post(`/receiving/queryStockInPage/${params.pageNo}/${params.pageSize}`, params, config)
+//  入库审核 列表  有分页
+export const receivingAuditList = (params, config = {}) => http.post(`/receiving/queryStockInAuditPage/${params.pageNo}/${params.pageSize}`, params, config)
+// 修改入库数量
+export const updateRealPutQty = (params, config = {}) => http.post(`/receivingDetail/updateRealPutQty/${params.productSn}`, params, config)
+// 采购入库详细列表
+export const receivingDetail = (params, config = {}) => http.post(`/receivingDetail/queryPage/${params.pageNo}/${params.pageSize}`, params, config)
+// 采购入库详情
+export const receivingQuery = (params, config = {}) => http.post(`/receiving/query`, params, config)
+//  采购 入库
+export const purchaseWriteStockIn = (params, config = {}) => http.post(`/receiving/stockIn`, params, config)
+//  采购入库 修改仓库仓位
+export const purchaseUpdateWarehouse = (params, config = {}) => http.post(`/receivingDetail/updateWarehouse`, params, config)

+ 17 - 0
pages.json

@@ -282,7 +282,24 @@
 				"navigationBarTitleText": "出入库明细",
 				"enablePullDownRefresh": false
 			}
+		},
+		{
+		    "path" : "pages/purchasing/list",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "采购入库",
+		        "enablePullDownRefresh": false
+		    }
 		}
+        ,{
+            "path" : "pages/purchasing/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "采购入库",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 25 - 12
pages/index/index.vue

@@ -9,11 +9,11 @@
 			<view class="grid-box">
 				 <view @click="toRuku">
 					 <text class="iconfont icon-ruku"></text>
-					 <text class="label">入库</text>
+					 <text class="label">散件入库</text>
 				 </view>
-				 <view @click="toChuku">
-					 <text class="iconfont icon-chukuguanli"></text>
-					 <text class="label">库</text>
+				 <view @click="toCgRuku">
+					 <text class="iconfont icon-caigouruku-huang"></text>
+					 <text class="label">采购入库</text>
 				 </view>
 			</view>
 			<view class="grid-box">
@@ -27,9 +27,9 @@
 				 </view>
 			</view>
 			<view class="grid-box">
-				 <view @click="toStockQuery">
-					 <text class="iconfont icon-kucunchaxun"></text>
-					 <text class="label">库存查询</text>
+				 <view @click="toChuku">
+					 <text class="iconfont icon-chukuguanli"></text>
+					 <text class="label">库</text>
 				 </view>
 				 <view @click="torukurecord">
 					 <text class="iconfont icon-churukujilu"></text>
@@ -41,7 +41,10 @@
 					 <text class="iconfont icon-xiangmatiaomaluru"></text>
 					 <text class="label">条码维护</text>
 				 </view>
-				 <view></view>
+				 <view @click="toStockQuery">
+					 <text class="iconfont icon-kucunchaxun"></text>
+					 <text class="label">库存查询</text>
+				 </view>
 			</view>
 		</view>
 		<view class="copright">
@@ -172,6 +175,11 @@
 				uni.navigateTo({
 					url:"/pages/stock/index"
 				})
+			},
+			toCgRuku(){
+				uni.navigateTo({
+					url:"/pages/purchasing/list"
+				})
 			}
 		}
 	}
@@ -230,10 +238,15 @@
 					color: #ff0000;
 				}
 				.icon-churukujilu{
-					color: #00aaff;
+					color: #00aa7f;
 				}
 				.icon-chukuguanli{
-					color: #00aa00;
+					font-size: 115upx;
+					color: #ffaa00;
+				}
+				.icon-caigouruku-huang{
+					font-size: 103upx;
+					color: #00aaff;
 				}
 				.icon-IMSpandianguanli{
 					font-size: 105upx;
@@ -241,11 +254,11 @@
 				}
 				.icon-pandianjilu{
 					font-size: 105upx;
-					color: #55557f;
+					color: #aaaa00;
 				}
 				.icon-kucunchaxun{
 					font-size: 108upx;
-					color: #ffaa00;
+					color: #ff5500;
 				}
 				.icon-xiangmatiaomaluru{
 					font-size: 108upx;

+ 184 - 0
pages/purchasing/index.vue

@@ -0,0 +1,184 @@
+<template>
+	<view class="p-content">
+		<view class="p-head" v-if="baseData">
+			<view>
+				<text>采购单号:</text>
+				<text style="color: crimson;">{{baseData[0].purchaseBillNo}}</text>
+			</view>
+			<view>
+				<text>发货单号:</text>
+				<text style="color: crimson;">{{baseData[0].sendBillNo}}</text>
+			</view>
+			<view>
+				<text>条码:</text>
+				<view>
+					<input
+					@blur="queryProduct"
+					style="width: 100%;text-align: left;" 
+					class="uni-input" 
+					placeholder="扫描或输入条码" 
+					border="surround" 
+					v-model="code">
+				</view>
+			</view>
+			<view style="justify-content: flex-start;flex-wrap: wrap;"  v-for="(item,bindex) in baseData" :key="item.id">
+				<view>总款数:{{ item.totalPutCategory }}</view>
+				<view>本次发货数量合计: {{ item.totalPutQty }}</view>
+				<view>本次发货金额合计: {{ item.totalPutAmount?toThousands(item.totalPutAmount,2):'0.00' }}</view>
+				<view>本次入库数量合计: {{ item && (item.totalRealPutQty || item.totalRealPutQty==0) ? item.totalRealPutQty : '--' }}</view>
+				<view>本次入库金额合计: {{ item && (item.totalRealPutAmount || item.totalRealPutAmount==0) ? toThousands(item.totalRealPutAmount, 2) : '--' }}</view>
+			</view>
+		</view>
+		<view class="p-body">
+			<uni-table style="width: 100%;" border emptyText="暂无数据" :loading="loading" >
+				<!-- 表头行 -->
+				<uni-tr>
+					<uni-td align="center">产品编码</uni-td>
+					<uni-td align="center">产品分类</uni-td>
+					<uni-td align="center">入库/发货数量</uni-td>
+					<uni-td align="center">入库金额</uni-td>
+				</uni-tr>
+				<!-- 表格数据行 -->
+				<uni-tr v-for="item in detailList" :key="item.id" :checkedRow="curProduct&&curProduct.qrCode == item.qrCode">
+					<uni-td width="30%" align="center">{{item.dealerProductEntity.code}}</uni-td>
+					<uni-td width="30%" align="center">{{item.dealerProductEntity.productTypeName2}}</uni-td>
+					<uni-td width="25%" align="center"><text style="color: red;">{{item.realPutQty}}</text>/{{item.putQty}}</uni-td>
+					<uni-td width="15%" align="center">
+						 {{item.realPutAmount}}
+					</uni-td>
+				</uni-tr>
+			</uni-table>
+		</view>
+		<view class="p-footer">
+			<button :disabled="loading" size="mini" type="primary" @click="toOut"> 入库 <text class="iconfont icon-icon-test43"></text></button>
+		</view>
+		<scanCode></scanCode>
+	</view>
+</template>
+
+<script>
+	import scanCode from '@/libs/scan-code.vue';
+	import { purchaseWriteStockIn, receivingQuery, receivingDetail, purchaseUpdateWarehouse, updateRealPutQty } from '@/config/api.js'
+	import { playAudio, toThousands } from '@/libs/tools.js'
+	export default {
+		components: { scanCode },
+		data() {
+			return {
+				loading: false,
+				baseData: null,
+				detailList:[],
+				code:'',
+				receivingBillSn: null,
+				salesId: null,
+				curProduct: null,
+				toThousands
+			};
+		},
+		onLoad(opts) {
+		  var _this = this
+		  this.receivingBillSn = opts.receivingBillSn
+		  this.salesId = opts.id
+		  this.getDetail()
+		  this.getDetailList()
+		  
+		  uni.$on('scancodedate', function(content) {
+			  console.log("扫描到的内容为:", content)
+			  _this.code = content||''
+			  _this.queryProduct()
+		  })
+		},
+		onShow() {
+			this.hideKeyborder()
+		},
+		onUnload() {
+			uni.$off('scancodedate')
+		},
+		methods: {
+			hideKeyborder(){
+				uni.hideKeyboard()
+			},
+			//检货
+			queryProduct(){
+				if(this.code==''){return}
+				this.loading = true
+				salesPick({receivingBillSn: this.receivingBillSn, productQrCode: this.code}).then(res => {
+					console.log(res)
+					if(res.status == 200){
+						if(res.data){
+							this.getDetailList()
+						}else{
+							uni.$u.toast("此商品不存在")
+							playAudio('error')
+						}
+					}
+					this.loading = false
+				})
+			},
+			// 详情
+			getDetail(){
+				receivingQuery({receivingBillSn: this.receivingBillSn}).then(res => {
+					console.log(res,'详情')
+					if(res.status == 200){
+						this.baseData = res.data
+					}
+				})
+			},
+			// 产品明细列表
+			getDetailList(){
+				receivingDetail({pageNo:1,pageSize:1000,receivingBillSn:this.receivingBillSn}).then(res => {
+					if(res.status == 200){
+						this.detailList = res.data.list
+						const curProduct = this.detailList.find(item => item.qrCode == this.code)
+						this.curProduct = curProduct || null
+					}
+				})
+			},
+			// 入库
+			async toOut(){
+				const ret = await salesWriteStockOut({receivingBillSn: this.receivingBillSn})
+				if(ret.status == 200){
+					this.$store.state.vuex_isRefash = true
+					uni.navigateBack()
+				}
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.p-content{
+		.p-head{
+			font-size: 32upx;
+			color: $uni-text-color;
+			>view{
+				display: flex;
+				align-items: center;
+				padding: 10upx 20upx;
+				border-bottom: 1px solid #eee;
+				> view{
+					display: flex;
+					padding: 0 10upx;
+					align-items: center;
+				}
+			}
+			.uni-input{
+				border: 1px solid #eee;
+				width: 150upx;
+				text-align: center;
+				padding: 8upx;
+			}
+		}
+		.p-body{
+			overflow: auto;
+			flex-grow: 1;
+			height: 50%;
+		}
+		.p-footer{
+			padding:30upx;
+			display: flex;
+			> button{
+				width: 40%;
+			}
+		}
+	}
+</style>

+ 114 - 0
pages/purchasing/list.vue

@@ -0,0 +1,114 @@
+<template>
+	<u-cell-group>
+	    <u-cell
+	        center
+			isLink
+			v-for="item in list"
+			:key="item.id"
+			@click="toEdit(item)"
+	    >
+		<view slot="label">
+			<view class="u-kh">
+				<view>
+					{{item.purchaseBillNo}}
+				</view>
+			</view>
+			<view class="u-time">
+				发货单号: {{item.sendBillNo}}
+			</view>
+			<view class="u-time">创建时间:{{item.createDate}}</view>
+			<view class="u-time" v-if="item.stockPutTime">入库时间:{{item.stockPutTime}}</view>
+		</view>
+		<view slot="value">
+			<text class="u-text" :style="{color: (item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT'|| item.auditState == 'WAIT_PUT_WAREHOUSE') ? '#00aaff' : '#999'}">{{item.auditStateDictValue}}</text>
+		</view>
+		</u-cell>
+		<view v-if="list.length==0&&status != 'loading'">
+			<u-empty :iconSize="60" text="暂无数据" :marginTop="100"></u-empty>
+		</view>
+		<view style="padding: 30rpx 0;">
+			<u-loadmore :status="status" />
+		</view>
+	</u-cell-group>
+</template>
+
+<script>
+	import { receivingStockList } from '@/config/api.js'
+	export default{
+		data(){
+			return {
+				list: [],
+				pageSize: 10,
+				pageNo: 1,
+				total: 0,
+				status: 'loadmore'
+			}
+		},
+		onLoad() {
+			var _this = this
+			this.status = 'loading'
+			this.getList()
+			
+			// 刷新
+			uni.$on('refashList', function(content) {
+				_this.status = 'loading'
+				_this.getList()
+			})
+		},
+		onUnload() {
+			uni.$off("refashList")
+		},
+		methods:{
+			getList(){
+				receivingStockList({pageSize:this.pageSize,pageNo:this.pageNo}).then(res => {
+					if(res.status == 200){
+						const list = res.data.list
+						this.total = res.data.count
+						if(this.pageNo == 1){
+							this.list = list
+						}else{
+							this.list = this.list.concat(list)
+						}
+						if(this.list.length < this.total){
+							this.status = 'loadmore'
+						}else{
+							this.status = 'nomore'
+						}
+					}
+				})
+			},
+			toEdit(item){
+				// 入库
+				if(item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT' || item.auditState == 'WAIT_PUT_WAREHOUSE'){
+					uni.navigateTo({
+						url:"/pages/purchasing/index?receivingBillSn="+item.receivingBillSn+"&id="+item.id
+					})
+				}
+			},
+			onReachBottom(){
+				const pageNums = Math.ceil(this.total / this.pageSize)
+				if(this.pageNo < pageNums){
+					this.pageNo = this.pageNo + 1
+					this.status = 'loading'
+					this.getList()
+				}else{
+					this.status = 'nomore'
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.u-time{
+		color: $uni-text-color-grey;
+		font-size: 30upx;
+	}
+	.u-kh{
+		font-size: 34upx;
+		display: flex;
+	}
+	.u-text{
+		font-size: 30upx;
+	}
+</style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
static/iconfont/iconfont.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
unpackage/dist/dev/app-plus/app-config-service.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 41 - 13
unpackage/dist/dev/app-plus/app-view.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
unpackage/dist/dev/app-plus/static/iconfont/iconfont.css


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä