Browse Source

添加直接调拨单(生成)模块

ZL 3 weeks ago
parent
commit
ed1a887b58
2 changed files with 59 additions and 10 deletions
  1. 48 9
      pages/direct-transfer/index.vue
  2. 11 1
      pages/index/index.vue

+ 48 - 9
pages/direct-transfer/index.vue

@@ -1,23 +1,27 @@
 <template>
 	<view>
 		<view class="sticky-box">
-			<view class="button-group">
+			<view class="button-group" v-if="isCreate === false">
 				<button type="default" @click="reset">取消</button>
 				<!-- <button type="default" @click="navigateToSummary">统计</button> -->
-				<button type="default" @click="navigateToSearch">查询</button>
+				<button type="default" @click="navigateToSearch" >查询</button>
 				<button type="default" >源单</button>
-				<button type="default" @click="navigateToStage">暂存</button>
+				<button type="default" @click="navigateToStage" >暂存</button>
+				<button type="default" @click="navigateToSearch">提交</button>
+			</view>
+			<view class="button-group" v-else>
+				<button type="default" @click="reset">取消</button>
 				<button type="default" @click="navigateToSearch">提交</button>
 			</view>
 			<uni-easyinput prefixIcon="search" :focus="isFocus" v-model="searchValue" @blur="isFocus = false"
-				@confirm="scan" @clear="clear" placeholder="请扫描拼件单号">
+				@confirm="getIsCreate()" @clear="clear" placeholder="请扫描拼件单号">
 			</uni-easyinput>
 		</view>
 		<view class="table-container" style="height: 100vh;">
 			<scroll-view class="table-content" :style="{'height': clientHeight + 'px'}" scroll-x scroll-y
 				:scroll-into-view="scrollItem">
-				<!-- <scroll-view scroll-x="true" class="scroll-view-header"> -->
-				<view class="table-header">
+				<!-- 表头-正常-->
+				<view class="table-header" v-if="isCreate === false">
 					<view class="table-cell">操作</view>
 					<view class="table-cell">扫描状态</view>
 					<view class="table-cell">调出仓位</view>
@@ -28,14 +32,21 @@
 					<view class="table-cell1">等级</view>
 					<view class="table-cellph">批号</view>
 					<view class="table-cell2">总件数</view>
-					<view class="table-cell" v-if="showRemark">备注</view>
+					<view class="table-cell">备注</view>
 					<view class="table-cell2">仓位原件数</view>
 					<view class="table-cell">发货件数</view>
 					<view class="table-cell3">单据编号</view>
 					<view class="table-cell">仓管员</view>
 				</view>
+				<!-- 表头-生成-->
+				<view class="table-header" v-else>
+					<view class="table-cell">操作</view>
+					<view class="table-cell2">条形码</view>
+					<view class="table-cell2">调出仓位</view>
+					<view class="table-cell2">调入仓位</view>
+				</view>
 				<view class="table-row" v-for="(item, index) in indexList" :key="index" :id="'scrollItem-' + index"
-					:style="getStyle(item.smzt)">
+					:style="getStyle(item.smzt)"  v-if="isCreate === false">
 					<view class="table-cell"><button type="default" size="mini" @click="edit(item,index)">编辑</button>
 					</view>
 					<view class="table-cell">{{ item.smzt? '已扫描' : '未扫描' }}</view>
@@ -53,6 +64,13 @@
 					<view class="table-cell3" :style="getStyle(item.smzt)">{{ item["FBillNo"] }}</view>
 					<view class="table-cell" :style="getStyle(item.smzt)">{{ item["FStockerId.FName"] }}</view>
 				</view>
+				<view class="table-row" v-else>
+					<view class="table-cell"><button type="default" size="mini" @click="edit(item,index)">编辑</button>
+					</view>
+					<view class="table-cell2">{{ item["FCMKBarCode"] }}</view>
+					<view class="table-cell2">{{ item["FSrcStockLocId.FF102029.FName"] }}</view>
+					<view class="table-cell2">{{ item["FDestStockLocId.FF102029.FName"] }}</view>
+				</view>
 			</scroll-view>
 		</view>
 
@@ -203,6 +221,7 @@
 				stageLists: [],
 				tableName: "common_bill",
 				destStockLocId: '',
+				isCreate: false,
 
 			};
 		},
@@ -210,6 +229,8 @@
 		onLoad(option) {
 			this.formId = uni.getStorageSync("formId")
 			this.fbillType = uni.getStorageSync("fbillType");
+			this.isCreate = option.isCreate || false
+			console.log(option.isCreate)
 			console.log(this.formId)
 			console.log(this.fbillType)
 			uni.setNavigationBarTitle({
@@ -710,6 +731,20 @@
 				playSequentially(audioUrlsArr);
 
 			},
+			scanToCreate(){
+				let vm = this
+				//校验是否输入条码
+				if (this.searchValueIsEmpty(this.searchValue)) {
+					playVoice(audioUrls.failVoiceUrl)
+					this.showToast()
+					this.focusPoint()
+					return
+				}
+				//根据条形码找编码
+				//根据编码批号找即时库存
+				//有多条时进行仓位选择
+				//扫描完毕信息填充
+			},
 			scan() {
 				let vm = this
 				//校验是否输入条码
@@ -783,6 +818,9 @@
 					this.handleScanSuccess(nowindex)
 				}
 			},
+			getIsCreate(){
+				return this.isCreate === true ? 'scanToCreate' : 'scan'
+			},
 			getHeightStyle() {
 				return 'height:' + this.listHeight + 'px';
 			},
@@ -798,7 +836,7 @@
 <style lang="scss">
 	.button-group {
 		display: flex;
-		justify-content: flex-start;
+		justify-content: space-between;
 		/* 主轴上左对齐 */
 		align-items: center;
 		/* 垂直居中对齐 */
@@ -806,6 +844,7 @@
 
 	.button-group button {
 		white-space: nowrap;
+		margin: 0;
 		/* 禁止换行 */
 		// margin-right: 10px;
 	}

+ 11 - 1
pages/index/index.vue

@@ -78,7 +78,8 @@
 						"生产领料料管作业平台",
 						"简单生产领料",
 						"采购退料单",
-						"直接调拨管理平台"
+						"直接调拨管理平台",
+						"直接调拨管理平台(生成)"
 					]
 				}]
 
@@ -146,6 +147,15 @@
 					uni.navigateTo({url: '/pages/direct-transfer/index'
 					});
 				}
+				if (item.name == "直接调拨管理平台(生成)") {
+					const formId = 'STK_TransferDirect';
+					const fbillType = 'ce8f49055c5c4782b65463a3f863bb4a';
+					uni.setStorageSync('formId', formId)
+					uni.setStorageSync('fbillType', fbillType)
+					uni.setStorageSync('moudleName', item.name)
+					uni.navigateTo({url: '/pages/direct-transfer/index?isCreate=true'
+					});
+				}
 			},
 			goScan() {
 				uni.navigateTo({