فهرست منبع

入库功能集其他模块和退库功能集合

LT31650A 1 ماه پیش
والد
کامیت
3cdfe2c99b
5فایلهای تغییر یافته به همراه206 افزوده شده و 281 حذف شده
  1. 55 3
      pages/index/index.vue
  2. 15 18
      pages/storage/index.vue
  3. 1 1
      pages/storage/summary.vue
  4. 4 70
      utils/newparams.js
  5. 131 189
      utils/storageParams.js

+ 55 - 3
pages/index/index.vue

@@ -115,7 +115,8 @@
 						// url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
 						url: '/pages/stock-dispatch/index'
 					});
-				}if (item.name == "简单生产领料") {
+				}
+				if (item.name == "简单生产领料") {
 					const formId = 'SP_PickMtrl';
 					// const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
 					uni.setStorageSync('formId', formId)
@@ -125,7 +126,8 @@
 						// url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
 						url: '/pages/stock-dispatch/index'
 					});
-				}if (item.name == "采购退料单") {
+				}
+				if (item.name == "采购退料单") {
 					const formId = 'PUR_MRB';
 					// const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
 					uni.setStorageSync('formId', formId)
@@ -135,7 +137,8 @@
 						// url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
 						url: '/pages/stock-dispatch/index'
 					});
-				}if (item.name == "其他入库单") {
+				}
+				if (item.name == "其他入库单") {
 					const formId = 'STK_MISCELLANEOUS';
 					// const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
 					uni.setStorageSync('formId', formId)
@@ -146,6 +149,55 @@
 						url: '/pages/storage/index'
 					});
 				}
+				if (item.name == "采购入库单") {
+					const formId = 'STK_InStock';
+					// const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
+					uni.setStorageSync('formId', formId)
+					// uni.setStorageSync('fbillType', null)
+					uni.setStorageSync('moudleName', item.name)
+					uni.navigateTo({
+						// url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
+						url: '/pages/storage/index'
+					});
+				}
+				if (item.name == "受托加工入库单") {
+					const formId = 'STK_OEMInStock';
+					// const fbillType = 'd43d7e5b9def82fc11e3e582178e4360';
+					uni.setStorageSync('formId', formId)
+					// uni.setStorageSync('fbillType', null)
+					uni.setStorageSync('moudleName', item.name)
+					uni.navigateTo({
+						// url: `/pages/stock-dispatch/index?FormId=${encodeURIComponent(formId)}&FBillType=${encodeURIComponent(fbillType)}`
+						url: '/pages/storage/index'
+					});
+				}
+				if (item.name == "生产退料料管作业平台") {
+					const formId = 'LT_PRD_PMCWorkBench';
+					uni.setStorageSync('formId', formId)
+					uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
+					uni.setStorageSync('moudleName', item.name)
+					uni.navigateTo({
+						url: '/pages/storage/index'
+					});
+				}
+				if (item.name == "简单生产退料单") {
+					const formId = 'SP_ReturnMtrl';
+					uni.setStorageSync('formId', formId)
+					// uni.setStorageSync('fbillType', 'd43d7e5b9def82fd11e3e603ca986cd9')
+					uni.setStorageSync('moudleName', item.name)
+					uni.navigateTo({
+						url: '/pages/storage/index'
+					});
+				}
+				if (item.name == "其他出库(退货)") {
+					const formId = 'STK_MisDelivery';
+					uni.setStorageSync('formId', formId)
+					uni.setStorageSync('fbillType', 'RETURN')
+					uni.setStorageSync('moudleName', item.name)
+					uni.navigateTo({
+						url: '/pages/storage/index'
+					});
+				}
 			},
 			goScan() {
 				uni.navigateTo({

+ 15 - 18
pages/storage/index.vue

@@ -32,13 +32,13 @@
 					<!-- <view class="table-cell"><button type="default" size="mini" @click="edit(item,index)">编辑</button>
 					</view> -->
 					<view class="table-cell">{{ item.smzt? '已扫描' : '未扫描' }}</view>
-					<view class="table-cell1" :style="getStyle(item.smzt)">{{ item["FEnchaseNum.LT"] }}</view>
+					<view class="table-cell1" :style="getStyle(item.smzt)">{{ item["FENCHASENUM.LT"] }}</view>
 					<view class="table-cell">{{ item["FStockLocId.FF102029.FNumber"] }}</view>
 					<view class="table-cell" :style="getStyle(item.smzt)">{{ item["FSTOCKID.FName"] }}</view>
 					<view class="table-cellwl" :style="getStyle(item.smzt)">{{ item["FMATERIALID.FNumber"] }}</view>
 					<view class="table-cellph" :style="getStyle(item.smzt)">{{ item["FLOT.FNumber"] }}</view>
 					<view class="table-cell1" :style="getStyle(item.smzt)">
-						{{ item["FQty"] }}
+						{{ getActualWorkQuantity(item) }}
 					</view>
 					<view class="table-cell1" :style="getStyle(item.smzt)">{{ item["FUnitID.FName"] }}</view>
 					<view class="table-cell" :style="getStyle(item.smzt)">{{ item["FDate"].substring(0, 10) }}</view>
@@ -80,11 +80,6 @@
 		audioUrls,
 		playSequentially
 	} from '../../utils/audio2';
-	import {
-		getAuditParam,
-		getSaveParam,
-		getSubmitParam
-	} from '../../utils/params';
 	import submitHelper from '@/utils/storageSubmitHelper.js'; // 确保路径正确
 	import {
 		executeSql
@@ -94,7 +89,7 @@
 		getSearchParam,
 		getStorageByBillNoParam,
 		getStorageSearchParam
-	} from '@/utils/newparams.js';
+	} from '@/utils/storageParams.js';
 	export default {
 		onShow() {
 			const res = uni.getSystemInfo({
@@ -357,13 +352,8 @@
 		methods: {
 			getActualWorkQuantity(item) {
 				switch (this.formId) {
-					case 'LT_PRD_PMCWorkBench':
-					case 'SP_PickMtrl':
-						return item["FActualQty"];
-					case 'STK_MisDelivery':
-						return item["FQty"];
-					case 'PUR_MRB':
-						return item["FRMREALQTY"];
+					case 'STK_InStock':
+						return item["FRealQty"];
 					default:
 						return item["FQty"];
 				}
@@ -645,6 +635,7 @@
 			showModalAndHandleSubmit(nowindex) {
 				let vm = this
 				console.log(nowindex)
+				console.log(this.indexList[nowindex])
 				let bBillNo = this.indexList[nowindex]["FBillNo"]
 				let FID = this.indexList[nowindex]["FID"]
 				this.$nextTick(() => {
@@ -696,18 +687,22 @@
 				// this.Location = this.indexList[nowindex]["FStockLocId.FF102029.fname"]
 				// this.indexList[nowindex].smzt = 1 //修改数据状态
 				this.indexList = this.indexList.map(item => {
-					if (item["FEnchaseNum.LT"] == this.searchValue) {
+					if (item["FENCHASENUM.LT"] == this.searchValue) {
 						item.smzt = 1
 					}
 					return item
 				})
+				console.log(this.indexList)
 				let nowindex = null; //该条码的索引
 
 				for (let i = 0; i < this.indexList.length; i++) { //获取查询装箱单号对应仓位,并切换当前仓位
-					if (this.indexList[i]["FEnchaseNum.LT"] === this.searchValue) {
+				console.log(this.indexList[i]["FENCHASENUM.LT"])
+				console.log(this.searchValue)
+					if (this.indexList[i]["FENCHASENUM.LT"] === this.searchValue) {
 						// nowlocation = this.indexList[i]["FStockLocId.FF102029.fname"] //当前仓位
 						nowindex = i //当前索引
 						this.stockNum = this.indexList[nowindex]["FSTOCKID.FNumber"]
+						console.log(this.indexList[nowindex]["FSTOCKID.FNumber"])
 						// this.balance = this.indexList[i]["quantity"] - this.indexList[i]["rowCount"]
 						break;
 					}
@@ -779,7 +774,7 @@
 					return
 				}
 				// 列表中是否存在该条码
-				if (this.checkBarcodeInArray(this.searchValue, this.indexList, "FEnchaseNum.LT")) { //不存在
+				if (this.checkBarcodeInArray(this.searchValue, this.indexList, "FENCHASENUM.LT")) { //不存在
 					//查询源单列表
 					const condition = this.createSearchCondition(this.searchValue);
 					const searchParam = getStorageSearchParam(condition)
@@ -796,9 +791,11 @@
 							BillList.forEach(item => {
 								// item.smzt = 0; // 增加属性 smzt,并设置初始值为0
 								this.$set(item, 'smzt', 0);
+								this.$set(item, 'FStockLocId.FF102029.FNumber', null);
 							})
 							// this.indexList = BillList
 							this.indexList = this.indexList.concat(BillList)
+							
 							this.handleScanSuccess()
 							// this.indexList = this.indexList.map(item => {
 							// 	if (item["FEnchaseNum.LT"] == this.searchValue) {

+ 1 - 1
pages/storage/summary.vue

@@ -60,7 +60,7 @@
 		getSaveParam,
 		getSubmitParam
 	} from '../../utils/params';
-	import submitHelper from '../../utils/commonSubmitHelper.js';
+	import submitHelper from '../../utils/storageSubmitHelper.js';
 	import {
 		executeSql
 	} from '../../utils/database';

+ 4 - 70
utils/newparams.js

@@ -2,9 +2,11 @@
 const FieldKeysMap = {
 	"STK_MisDelivery": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo_LT,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FWorkCenterId.fname,FDate,FEntryNote,FPickingPeople_LT.fname,FSTOCKERID.fname,FWorkDeptId_LT.fname,FDeptId.FName,FPickerId.FName",
 	"SP_PickMtrl": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FActualQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo_LT,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FWorkCenterId.fname,FEntrtyMemo,FDate,FPickerId.fname,FSTOCKERID.fname,FStockActualQty,FWorkShopId.fname,FPickingPeople_LT.FName",
-	"LT_PRD_PMCWorkBench": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FActualQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FWorkCenterId_LT.fname,FEntrtyMemo,FDate,FApplicantId.fname,FSTOCKERID.fname,FStockActualQty,FWorkShopId.fname",
+	"LT_PRD_PMCWorkBench": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FActualQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FWorkCenterId_LT.fname,FEntrtyMemo,FDate,FApplicantId.fname,FSTOCKERID.fname,FStockActualQty,FWorkShopId.fname,FSTOCKID.FNumber",
 	"PUR_MRB": "FID,FPURMRBENTRY_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FInventoryQty,FENCHASENUM_LT,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FDate,FSTOCKERID.fname,FStockId.FNumber,FRMREALQTY,FFabricOrderNo,FPURCHASERID.fname",
-	"STK_MISCELLANEOUS": "FID,FEntity_FEntryID,FEnchaseNum_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber"
+	// "STK_MISCELLANEOUS": "FID,FEntity_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
+	// "STK_InStock": "FID,FInStockEntry_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FRealQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
+	// "STK_OEMInStock": "FID,FBillEntry_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber"
 };
 
 export function getSearchParam(condition) {
@@ -118,75 +120,7 @@ export function getSearchParam(condition) {
 		}]
 	}
 }
-export function getStorageSearchParam(condition) {
-	let FilterString = [{
-		"Left": "(",
-		"FieldName": "FDocumentStatus",
-		"Compare": "105",
-		"Value": "A",
-		"Right": "",
-		"Logic": 1
-	}, {
-		"Left": "",
-		"FieldName": "FDocumentStatus",
-		"Compare": "105",
-		"Value": "D",
-		"Right": ")",
-		"Logic": 0
-	}, {
-		"Left": "",
-		"FieldName": "FStockDirect",
-		"Compare": "29",
-		"Value": "GENERAL",
-		"Right": "",
-		"Logic": 0
-	}, {
-		"Left": "(",
-		"FieldName": "FEntryStoreType_LT.FDataValue",
-		"Compare": "67",
-		"Value": "自产入库",
-		"Right": "",
-		"Logic": 1
-	}, {
-		"Left": "",
-		"FieldName": "FEntryStoreType_LT.FDataValue",
-		"Compare": "67",
-		"Value": "衬衣面料内部调入",
-		"Right": ")",
-		"Logic": 0
-	}, {
-		"Left": "",
-		"FieldName": "FEnchaseNum_LT",
-		"Compare": "67",
-		"Value": condition.FEnchaseNum_LT,
-		"Right": "",
-		"Logic": 0
-	}]
 
-	return {
-		"parameters": [{
-			"FormId": condition.FormId,
-			"FieldKeys": FieldKeysMap[condition.FormId],
-			"FilterString": FilterString,
-		}]
-	}
-}
-export function getStorageByBillNoParam(condition) {
-	return {
-		"parameters": [{
-			"FormId": condition.FormId,
-			"FieldKeys": FieldKeysMap[condition.FormId],
-			"FilterString": [{
-				"Left": "",
-				"FieldName": "FBillNo",
-				"Compare": "338",
-				"Value": condition.FBillNo,
-				"Right": "",
-				"Logic": 0
-			}],
-		}]
-	}
-}
 export function getBillDetailListParam(condition) {
 	console.log(condition)
 	return {

+ 131 - 189
utils/storageParams.js

@@ -1,123 +1,12 @@
 // 定义字段映射
 const FieldKeysMap = {
-	"STK_MisDelivery": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo_LT,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FWorkCenterId.fname,FDate,FEntryNote,FPickingPeople_LT.fname,FSTOCKERID.fname,FWorkDeptId_LT.fname,FDeptId.FName,FPickerId.FName",
-	"SP_PickMtrl": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FActualQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo_LT,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FWorkCenterId.fname,FEntrtyMemo,FDate,FPickerId.fname,FSTOCKERID.fname,FStockActualQty,FWorkShopId.fname,FPickingPeople_LT.FName",
-	"LT_PRD_PMCWorkBench": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FActualQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FWorkCenterId_LT.fname,FEntrtyMemo,FDate,FApplicantId.fname,FSTOCKERID.fname,FStockActualQty,FWorkShopId.fname",
-	"PUR_MRB": "FID,FPURMRBENTRY_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FInventoryQty,FENCHASENUM_LT,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FDate,FSTOCKERID.fname,FStockId.FNumber,FRMREALQTY,FFabricOrderNo,FPURCHASERID.fname",
-	"STK_MISCELLANEOUS": "FID,FEnchaseNum_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber"
+	"STK_MISCELLANEOUS": "FID,FEntity_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
+	"STK_InStock": "FID,FInStockEntry_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FRealQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
+	"STK_OEMInStock": "FID,FBillEntry_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
+	"LT_PRD_PMCWorkBench": "FID,FEntity_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FActualQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
+	"SP_ReturnMtrl": "FID,FEntity_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
+	"STK_MisDelivery": "FID,FEntity_FEntryID,FENCHASENUM_LT,FSTOCKID.FName,FStockLocId.FF102029.FNumber,FMATERIALID.FNumber,FLOT.FNumber,FQty,FUnitID.FName,FDate,FBillNo,FSTOCKID.FNumber",
 };
-
-export function getSearchParam(condition) {
-	let FilterString = [{ //其他出库
-			"Left": "(",
-			"FieldName": "FDocumentStatus",
-			"Compare": "105",
-			"Value": "A",
-			"Right": "",
-			"Logic": 1
-		},
-		// {//审核中
-		// 	"Left": "",
-		// 	"FieldName": "FDocumentStatus",
-		// 	"Compare": "105",
-		// 	"Value": "B",
-		// 	"Right": "",
-		// 	"Logic": 1
-		// },
-		{
-			"Left": "",
-			"FieldName": "FDocumentStatus",
-			"Compare": "105",
-			"Value": "D",
-			"Right": ")",
-			"Logic": 0
-		}, {
-			"Left": "",
-			"FieldName": "FStockOrgId.FNumber",
-			"Compare": "67",
-			"Value": condition.FStockOrgId,
-			"Right": "",
-			"Logic": 0
-		},
-		{
-			"FieldName": "FBillNo",
-			"Compare": "17",
-			"Value": condition.billNo,
-			"Left": "",
-			"Right": "",
-			"Logic": 0
-		},
-		{
-			"Left": "",
-			"FieldName": "FStockId.FName",
-			"Compare": "17",
-			"Value": "面料",
-			"Right": "",
-			"Logic": 0
-		},
-		{
-			"FieldName": "FDate",
-			"Compare": "39",
-			"Value": condition.range[0],
-			"Left": "(",
-			"Right": "",
-			"Logic": "0"
-		},
-		{
-			"FieldName": "FDate",
-			"Compare": "16",
-			"Value": condition.range[1],
-			"Left": "",
-			"Right": ")",
-			"Logic": "0"
-		}
-	]
-	let FieldKeys =
-		"FID,FWorkCenterId.fname,FPickingPeople_LT.fname,FSTOCKERID.fname,FBillNo,FDate,FNote,FStockOrgId"
-	console.log(condition.FBillType)
-	if (condition.FBillType != null) { //领料
-		FilterString.push({
-			"Left": "",
-			"FieldName": "FBillType",
-			"Compare": "105",
-			"Value": condition.FBillType,
-			"Right": "",
-			"Logic": 0
-		});
-		console.log('aaaa')
-		FieldKeys =
-			"FID,FWorkCenterId_LT.fname,FApplicantId.fname,FSTOCKERID.fname,FBillNo,FDate,FDescription,FStockOrgId"
-	}
-	if (condition.FormId == "STK_MisDelivery") { //其他出库
-		FilterString.push({
-			"Left": "",
-			"FieldName": "FStockDirect",
-			"Compare": "29",
-			"Value": "GENERAL",
-			"Right": "",
-			"Logic": 0
-		});
-		FieldKeys =
-			"FID,FWorkCenterId.fname,FPickingPeople_LT.fname,FSTOCKERID.fname,FBillNo,FDate,FNote,FStockOrgId,FDeptId.FName,FPickerId.FName"
-	}
-	if (condition.FormId == "SP_PickMtrl") { //简单生产领料单
-		FieldKeys =
-			"FID,FWorkCenterId.fname,FPickerId.fname,FSTOCKERID.fname,FBillNo,FDate,FDescription,FStockOrgId,FPickingPeople_LT.FName"
-	}
-	if (condition.FormId == "PUR_MRB") { //采购退料单
-		FieldKeys =
-			"FID,FSupplierID.fname,FPURCHASERID.fname,FPURCHASEDEPTID.fname,FSTOCKERID.fname,FBillNo,FDate,FStockOrgId"
-	}
-	console.log(FieldKeys)
-
-	return {
-		"parameters": [{
-			"FormId": condition.FormId,
-			"FieldKeys": FieldKeys,
-			"FilterString": FilterString
-		}]
-	}
-}
 export function getStorageSearchParam(condition) {
 	let FilterString = [{
 		"Left": "(",
@@ -162,6 +51,115 @@ export function getStorageSearchParam(condition) {
 		"Right": "",
 		"Logic": 0
 	}]
+	if (condition.FormId == "STK_InStock" || condition.FormId == "STK_OEMInStock"||condition.FormId == "SP_ReturnMtrl") { 
+		FilterString = [{
+			"Left": "(",
+			"FieldName": "FDocumentStatus",
+			"Compare": "105",
+			"Value": "A",
+			"Right": "",
+			"Logic": 1
+		}, {
+			"Left": "",
+			"FieldName": "FDocumentStatus",
+			"Compare": "105",
+			"Value": "D",
+			"Right": ")",
+			"Logic": 0
+		}, {
+			"Left": "",
+			"FieldName": "FEnchaseNum_LT",
+			"Compare": "67",
+			"Value": condition.FEnchaseNum_LT,
+			"Right": "",
+			"Logic": 0
+		}]
+
+	}
+	if (condition.FormId == "LT_PRD_PMCWorkBench") { //
+		FilterString = [{
+				"Left": "(",
+				"FieldName": "FDocumentStatus",
+				"Compare": "105",
+				"Value": "A",
+				"Right": "",
+				"Logic": 1
+			}, {
+				"Left": "",
+				"FieldName": "FDocumentStatus",
+				"Compare": "105",
+				"Value": "D",
+				"Right": ")",
+				"Logic": 0
+			}, {
+				"Left": "",
+				"FieldName": "FEnchaseNum_LT",
+				"Compare": "67",
+				"Value": condition.FEnchaseNum_LT,
+				"Right": "",
+				"Logic": 0
+			},
+			{
+				"Left": "",
+				"FieldName": "FStockId.FName",
+				"Compare": "17",
+				"Value": "面料",
+				"Right": "",
+				"Logic": 0
+			},
+			{
+				"Left": "",
+				"FieldName": "FBillType",
+				"Compare": "105",
+				"Value": "d43d7e5b9def82fd11e3e603ca986cd9",
+				"Right": "",
+				"Logic": 0
+			}
+		]
+
+	}
+	if (condition.FormId == "STK_MisDelivery") { //
+		FilterString = [{
+				"Left": "(",
+				"FieldName": "FDocumentStatus",
+				"Compare": "105",
+				"Value": "A",
+				"Right": "",
+				"Logic": 1
+			}, {
+				"Left": "",
+				"FieldName": "FDocumentStatus",
+				"Compare": "105",
+				"Value": "D",
+				"Right": ")",
+				"Logic": 0
+			}, {
+				"Left": "",
+				"FieldName": "FEnchaseNum_LT",
+				"Compare": "67",
+				"Value": condition.FEnchaseNum_LT,
+				"Right": "",
+				"Logic": 0
+			},
+			{
+				"Left": "",
+				"FieldName": "FStockId.FName",
+				"Compare": "17",
+				"Value": "面料",
+				"Right": "",
+				"Logic": 0
+			},
+			{
+				"Left": "",
+				"FieldName": "FStockDirect",
+				"Compare": "29",
+				"Value": "RETURN",
+				"Right": "",
+				"Logic": 0
+			}
+		]
+
+	}
 
 	return {
 		"parameters": [{
@@ -187,77 +185,10 @@ export function getStorageByBillNoParam(condition) {
 		}]
 	}
 }
-export function getBillDetailListParam(condition) {
-	console.log(condition)
-	return {
-		"parameters": [{
-			"FormId": condition.FormId,
-			"FieldKeys": FieldKeysMap[condition.FormId],
-			"FilterString": [{
-				"Left": "",
-				"FieldName": "FID",
-				"Compare": "338",
-				"Value": condition.selectedFID,
-				"Right": "",
-				"Logic": 0
-			}],
-		}]
-	}
-
-}
-// 定义一个函数来创建库存查询请求数据
-export function createInventoryQueryRequest(value) {
-	return {
-		parameters: [{
-			FormId: "STK_Inventory",
-			FieldKeys: "fID",
-			FilterString: [{
-					Left: "",
-					FieldName: "FStockLocId.FF102029.FName",
-					Compare: "67",
-					Value: value,
-					Right: "",
-					Logic: 0
-				},
-				{
-					Left: "",
-					FieldName: "FBaseQty",
-					Compare: "21",
-					Value: "0",
-					Right: "",
-					Logic: 0
-				}
-			]
-		}]
-	};
-}
 
-function getActualQtyKey(FormId) {
-	const keyMap = {
-		'LT_PRD_PMCWorkBench': 'FActualQty',
-		'SP_PickMtrl': 'FActualQty',
-		'STK_MisDelivery': 'FQty',
-		'PUR_MRB': 'FRMREALQTY'
-	};
-	return keyMap[FormId] || 'FQty';
-}
-    // {
-    //     "FID": 1433700,
-    //     "FEnchaseNum.LT": "877895251",
-    //     "FSTOCKID.FName": "总公司衬衣面料仓库(国内)",
-    //     "FStockLocId.FF102029.FNumber": null,
-    //     "FMATERIALID.FNumber": "ML92730-222034LAM",
-    //     "FLOT.FNumber": "999423132132",
-    //     "FQty": 10000,
-    //     "FUnitID.FName": "米",
-    //     "FDate": "2024-09-04T00:00:00",
-    //     "FBillNo": "QTRK2409040002",
-    //     "FSTOCKID.FNumber": "MLCK003",
-    //     "smzt": 1
-    // },
-function createEntityObject(item, actualQtyKey) {
+function createEntityObject(item, FEntryIDKey) {
 	return {
-		"FEntryID": item["FEntity.FEntryID"],
+		"FEntryID": item[FEntryIDKey+".FEntryID"],
 		// "FInventoryQty": item["FInventoryQty"],
 		// "FAuxPropId": {
 		// 	"FAUXPROPID__FF101501": {
@@ -277,14 +208,25 @@ function createEntityObject(item, actualQtyKey) {
 		// [actualQtyKey]: item[actualQtyKey] // 使用动态键名
 	};
 }
+function getFEntryIDKey(FormId) {
+	const keyMap = {
+		'STK_MISCELLANEOUS': 'FEntity',
+		'STK_InStock': 'FInStockEntry',
+		'STK_OEMInStock': 'FBillEntry',
+		'LT_PRD_PMCWorkBench': 'FEntity',
+		'SP_ReturnMtrl': 'FEntity',
+		'STK_MisDelivery': 'FEntity',
+	};
+	return keyMap[FormId];
+}
 
 export function getSaveParam(FormId, data, indexList) {
 	const targetFID = data;
-	// const actualQtyKey = getActualQtyKey(FormId);
+	const FEntryIDKey = getFEntryIDKey(FormId);
 
 	const FEntityObjects = indexList
 		.filter(item => item.FID === targetFID)
-		.map(item => createEntityObject(item));
+		.map(item => createEntityObject(item,FEntryIDKey));
 
 	const needUpdateFields = [
 		// "FInventoryQty",
@@ -316,7 +258,7 @@ export function getSaveParam(FormId, data, indexList) {
 				"Model": {
 					"FID": targetFID,
 					"FIsScanFabric": true,
-					"FEntity": FEntityObjects
+					[FEntryIDKey]: FEntityObjects
 				}
 			}
 		]