ysy před 2 roky
rodič
revize
740eb2ccaa

+ 1 - 1
pages/pda/feeding/components/instanceBom.vue

@@ -21,7 +21,7 @@
 				<view class="item">
 					<view class="lable rx-cc">数量</view>
 					<view class="content content_num">
-						<input class="uni-input" v-model="mate.demandQuantity"
+						<input class="uni-input" v-model="mate.feedQuantity"
 							type="digit"></input>
 						<view class="unit">/{{mate.unit}}</view>
 					

+ 2 - 2
pages/pda/feeding/details.vue

@@ -194,8 +194,8 @@
 				// CX-EQ-YLSJL-008	  设备
 				// M001 M002 模具 
 				//  S310000552731 物料
-				this.scanItData('CX-EQ-YLSJL-008', id)
-				return false
+				// this.scanItData('CX-EQ-YLSJL-008', id)
+				// return false
 
 				let _this = this
 				uni.scanCode({

+ 34 - 5
pages/pda/workOrder/search/index.vue

@@ -30,9 +30,9 @@
 					<label class="listBox rx-bs">
 
 						<view class="listBox-sel">
-						 
-							<checkbox :value="item.code" color="#fff" :disabled="item.disabled"
-								:checked="item.checked" />
+							<checkbox :value="item.code"
+								:class="item.rootCategoryLevelId == 1 &&  !item.checked ? 'checkedClass': ''"
+								color="#fff" :disabled="item.disabled" :checked="item.checked" />
 						</view>
 
 						<view class="listBox-con">
@@ -90,7 +90,8 @@
 		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
 			:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
 
-		<matterPop v-if='matterShow' :matterId='matterId' @close='close'></matterPop>
+		<matterPop v-if='matterShow' :matterId='matterId' :DTOList='DTOList' @close='close' @mattSave='mattSave'>
+		</matterPop>
 
 	</view>
 </template>
@@ -130,7 +131,8 @@
 				storageKey: null,
 
 				matterShow: false, //物料 左弹框
-				matterId: null
+				matterId: null,
+				DTOList: []
 			}
 		},
 
@@ -258,6 +260,10 @@
 
 								const warehouseId = i.pathIds && i.pathIds.split(',')[0]
 
+								if (i.rootCategoryLevelId == 1) {
+									i.mattList = []
+								}
+
 								return {
 									checked,
 									warehouseId,
@@ -295,6 +301,10 @@
 						}
 					}
 				} else if (this.isType == 'feed') {
+					this.$set(this.list[index], 'checked', false)
+
+
+					this.DTOList = val.inventoryDetailsDTOList
 					this.matterId = val.id
 					this.matterShow = true
 				}
@@ -308,6 +318,18 @@
 				this.matterShow = false
 			},
 
+			mattSave(maList, id) {
+
+				this.list.forEach(e => {
+					if (e.id == id) {
+						this.$set(e, 'checked', maList.length == 0 ? false : true)
+						e.mattList = maList
+						this.matterShow = false
+					}
+				})
+
+			},
+
 			//跳转回添加页面
 			jumpAdd() {
 				uni.$emit('setSelectList', this.memoList, this.pid)
@@ -398,4 +420,11 @@
 			}
 		}
 	}
+
+	.checkedClass {
+		/deep/ .uni-checkbox-input-checked {
+			background-color: #fff !important;
+			border: 1px solid #d1d1d1 !important;
+		}
+	}
 </style>

+ 40 - 294
pages/pda/workOrder/search/matterPop.vue

@@ -4,13 +4,13 @@
 			<view class="content-box">
 
 				<view class="list_box">
-			
+
 					<u-list @scrolltolower="scrolltolower">
 
-						<checkbox-group v-for="(item, index) in list" :key="index"
+						<checkbox-group v-for="(item, index) in ListData" :key="index"
 							@change="e => selectVal(e, item, index)">
 							<label class="listBox rx-bs">
-
+                                  
 								<view class="listBox-sel">
 									<checkbox :value="item.code" color="#fff" :disabled="item.disabled"
 										:checked="item.checked" />
@@ -23,14 +23,10 @@
 									</view>
 
 									<view class="listBox-bottom rx">
-										<view v-for="(itm, index) in tableH(item.rootCategoryLevelId)" :key="index"
-											class="items">
+										<view v-for="(itm, index) in tableH(1)" :key="index" class="item100">
 											{{ itm.label }}:{{ item[itm.prop] }}
 										</view>
 
-										<view class="items">
-											可用库存:{{ item.availableCountBase }} {{item.unit}}
-										</view>
 
 									</view>
 
@@ -41,6 +37,12 @@
 
 						</checkbox-group>
 
+						<view style='margin-top: 20vh;' v-if='DTOList.length == 0'>
+							<u-empty iconSize='150' textSize='32' text='暂无数据'>
+							</u-empty>
+						</view>
+
+
 					</u-list>
 				</view>
 
@@ -60,303 +62,41 @@
 	} from '../../common.js'
 	export default {
 		props: {
-			matterId: [String, Number]
+			matterId: [String, Number],
+
+			DTOList: {
+				type: Array,
+				default: () => {}
+			}
 		},
 		data() {
 			return {
 				show: true,
 				mode: 'right',
 				memoList: [],
-				list: [{
-						"id": "1753322665677725698",
-						"createTime": "2024-02-02 15:41:13",
-						"categoryId": "1740639160215891970",
-						"name": "返工料",
-						"rootCategoryLevelId": "1",
-						"code": "W31000056388",
-						"fixCode": "",
-						"brand": "",
-						"color": "",
-						"weight": "",
-						"purpose": "",
-						"ownershipGroupId": "",
-						"ownershipGroupName": "",
-						"ownershipUserId": "",
-						"repairGroupId": "",
-						"repairUserId": "",
-						"supplierId": "",
-						"positionId": "",
-						"roteId": "",
-						"detailLocation": "",
-						"imageUrl": "",
-						"attUrl": "",
-						"isIotEnable": 0,
-						"iotId": "",
-						"runStatus": "",
-						"networkStatus": "",
-						"extInfo": "",
-						"extInfoSelf": "",
-						"position": [{
-							"id": "1753322666474643458",
-							"substanceId": "1753322665677725698",
-							"sourceBizNo": "W30000025534080013",
-							"sourceType": 1,
-							"sourceBatchNo": "080",
-							"pathIds": "1745372293592903681,1745374089405132802,1745374089413521409,1745374089677762562",
-							"pathName": "型材分公司-原料仓,1号库区,A,A-11",
-							"minPositionId": "1745374089677762562",
-							"detailPosition": "",
-							"type": 2,
-							"num": 1,
-							"unit": "PCS",
-							"minUnit": "桶",
-							"deleted": 0,
-							"createTime": "2024-02-02 15:41:13",
-							"updateTime": "2024-02-02 15:41:13",
-							"createUserId": "1683714098556100610",
-							"updateUserId": "1683714098556100610"
-						}],
-						"category": {
-							"id": "1740639160215891970",
-							"createTime": "2024-01-01 23:41:29",
-							"categoryLevelGroupId": "",
-							"factoryCode": "",
-							"price": "",
-							"priceUnit": "",
-							"categoryLevelGroupCode": "",
-							"mrpControllerUser": "",
-							"differenceCode": "",
-							"mrpType": "",
-							"categoryLevelGroupName": "",
-							"categoryLevelId": "1738396672025526273",
-							"categoryLevelName": "返工料",
-							"name": "返工料",
-							"code": "W30000025534",
-							"categoryLevelPathIdParent": "",
-							"categoryLevelPathId": "1,1738375428798509057,1738396672025526273",
-							"categoryLevelPath": "物料-PR料-返工料",
-							"measuringUnit": "PCS",
-							"packingUnit": "箱",
-							"brandNum": "YL10.2",
-							"modelType": "YL10.2|BΦ16.0*100(MG)",
-							"specification": "",
-							"volume": "",
-							"volumeUnit": "",
-							"volumeUnitId": "",
-							"roughWeight": 0,
-							"netWeight": 50,
-							"weightUnit": "KG",
-							"weightUnitId": "",
-							"isProduct": 0,
-							"productCategoryLevelName": "",
-							"deptId": "",
-							"deptLeaderId": "",
-							"iotProductKey": "",
-							"remarkAttach": [],
-							"remark": "",
-							"description": "",
-							"warrantyPeriod": "",
-							"warrantyPeriodUnit": ""
-						},
-						"categoryDetail": "",
-						"codeNumber": ""
-					},
-					{
-						"id": "1747105301001793538",
-						"createTime": "2024-01-16 11:55:38",
-						"categoryId": "1739922471153106946",
-						"name": "混合料",
-						"rootCategoryLevelId": "1",
-						"code": "S310000552732",
-						"fixCode": "",
-						"brand": "",
-						"color": "",
-						"weight": "",
-						"purpose": "",
-						"ownershipGroupId": "",
-						"ownershipGroupName": "",
-						"ownershipUserId": "",
-						"repairGroupId": "",
-						"repairUserId": "",
-						"supplierId": "",
-						"positionId": "",
-						"roteId": "",
-						"detailLocation": "",
-						"imageUrl": "",
-						"attUrl": "",
-						"isIotEnable": 0,
-						"iotId": "",
-						"runStatus": "",
-						"networkStatus": "",
-						"extInfo": "",
-						"extInfoSelf": "",
-						"position": [{
-							"id": "1747105301005987842",
-							"substanceId": "1747105301001793538",
-							"sourceBizNo": "IN202401160074",
-							"sourceType": 2,
-							"sourceBatchNo": "001",
-							"pathIds": "test",
-							"pathName": "test",
-							"minPositionId": "-1",
-							"detailPosition": "test",
-							"type": 1,
-							"num": 2,
-							"unit": "KG",
-							"minUnit": "KG",
-							"deleted": 0,
-							"createTime": "2024-01-16 11:55:38",
-							"updateTime": "2024-01-16 11:55:38",
-							"createUserId": "1683714098556100610",
-							"updateUserId": "1683714098556100610"
-						}],
-						"category": {
-							"id": "1739922471153106946",
-							"createTime": "2023-12-29 00:13:37",
-							"categoryLevelGroupId": "",
-							"factoryCode": "10J0",
-							"price": "",
-							"priceUnit": "1",
-							"categoryLevelGroupCode": "",
-							"mrpControllerUser": "",
-							"differenceCode": "",
-							"mrpType": "",
-							"categoryLevelGroupName": "",
-							"categoryLevelId": "1738393436870770689",
-							"categoryLevelName": "混合料",
-							"name": "混合料",
-							"code": "W31000055273",
-							"categoryLevelPathIdParent": "",
-							"categoryLevelPathId": "[1,1677145633090453506,1738393436870770689]",
-							"categoryLevelPath": "物料,原料,混合料",
-							"measuringUnit": "PCS",
-							"packingUnit": "箱",
-							"brandNum": "XU102",
-							"modelType": "",
-							"specification": "",
-							"volume": "",
-							"volumeUnit": "",
-							"volumeUnitId": "",
-							"roughWeight": 10,
-							"netWeight": 10,
-							"weightUnit": "KG",
-							"weightUnitId": "",
-							"isProduct": 0,
-							"productCategoryLevelName": "",
-							"deptId": "",
-							"deptLeaderId": "",
-							"iotProductKey": "",
-							"remarkAttach": [],
-							"remark": "XU102",
-							"description": "",
-							"warrantyPeriod": "",
-							"warrantyPeriodUnit": ""
-						},
-						"categoryDetail": "",
-						"codeNumber": ""
-					},
-					{
-						"id": "1747105300896935938",
-						"createTime": "2024-01-16 11:55:38",
-						"categoryId": "1739922471153106946",
-						"name": "混合料",
-						"rootCategoryLevelId": "1",
-						"code": "S310000552731",
-						"fixCode": "",
-						"brand": "",
-						"color": "",
-						"weight": "",
-						"purpose": "",
-						"ownershipGroupId": "",
-						"ownershipGroupName": "",
-						"ownershipUserId": "",
-						"repairGroupId": "",
-						"repairUserId": "",
-						"supplierId": "",
-						"positionId": "",
-						"roteId": "",
-						"detailLocation": "",
-						"imageUrl": "",
-						"attUrl": "",
-						"isIotEnable": 0,
-						"iotId": "",
-						"runStatus": "",
-						"networkStatus": "",
-						"extInfo": "",
-						"extInfoSelf": "",
-						"position": [{
-							"id": "1747105300993404930",
-							"substanceId": "1747105300896935938",
-							"sourceBizNo": "IN202401160074",
-							"sourceType": 2,
-							"sourceBatchNo": "001",
-							"pathIds": "test",
-							"pathName": "test",
-							"minPositionId": "-1",
-							"detailPosition": "test",
-							"type": 1,
-							"num": 2,
-							"unit": "KG",
-							"minUnit": "KG",
-							"deleted": 0,
-							"createTime": "2024-01-16 11:55:38",
-							"updateTime": "2024-01-16 11:55:38",
-							"createUserId": "1683714098556100610",
-							"updateUserId": "1683714098556100610"
-						}],
-						"category": {
-							"id": "1739922471153106946",
-							"createTime": "2023-12-29 00:13:37",
-							"categoryLevelGroupId": "",
-							"factoryCode": "10J0",
-							"price": "",
-							"priceUnit": "1",
-							"categoryLevelGroupCode": "",
-							"mrpControllerUser": "",
-							"differenceCode": "",
-							"mrpType": "",
-							"categoryLevelGroupName": "",
-							"categoryLevelId": "1738393436870770689",
-							"categoryLevelName": "混合料",
-							"name": "混合料",
-							"code": "W31000055273",
-							"categoryLevelPathIdParent": "",
-							"categoryLevelPathId": "[1,1677145633090453506,1738393436870770689]",
-							"categoryLevelPath": "物料,原料,混合料",
-							"measuringUnit": "PCS",
-							"packingUnit": "箱",
-							"brandNum": "XU102",
-							"modelType": "",
-							"specification": "",
-							"volume": "",
-							"volumeUnit": "",
-							"volumeUnitId": "",
-							"roughWeight": 10,
-							"netWeight": 10,
-							"weightUnit": "KG",
-							"weightUnitId": "",
-							"isProduct": 0,
-							"productCategoryLevelName": "",
-							"deptId": "",
-							"deptLeaderId": "",
-							"iotProductKey": "",
-							"remarkAttach": [],
-							"remark": "XU102",
-							"description": "",
-							"warrantyPeriod": "",
-							"warrantyPeriodUnit": ""
-						},
-						"categoryDetail": "",
-						"codeNumber": ""
-					}
-				]
+				list: []
+
+			}
+		},
+		computed: {
+			ListData() {
+				const data = this.DTOList.map(m => {
+					 	m.checked = false
+						return {
+							...m
+						}
+				})
+				
+				this.list = data
+				
+				return data
 			}
 		},
 		methods: {
 			scrolltolower() {},
 
 			save() {
-
+			  this.$emit('mattSave', this.memoList, this.matterId)
 			},
 
 			//勾选
@@ -366,12 +106,13 @@
 
 
 				const idx = this.memoList.findIndex(
-					item => item.id === this.list[index].id
+					item => item.code === this.list[index].code
 				)
 
 				if (this.list[index].checked) {
 					if (idx === -1) {
 						this.memoList.push(this.list[index])
+						
 					}
 				} else {
 					if (idx > -1) {
@@ -446,6 +187,11 @@
 			font-style: normal;
 			flex-wrap: wrap;
 
+			.item100 {
+				width: 100%;
+				margin-top: 8rpx;
+			}
+
 			.items {
 				width: 50%;
 				margin-top: 8rpx;