huang_an 1 жил өмнө
parent
commit
46b1e32f0e

+ 1 - 1
pages/maintenanceWorkorder/order/OrderTask.vue

@@ -22,7 +22,7 @@
 						</view>
 						<view class="item_box rx-bc">
 							<view class="item_one perce50 rx-sc">
-								<view class="lable">设备编码:</view>
+								<view class="lable">计划单号:</view>
 								<view>{{item.planCode}}</view>
 							</view>
 						</view>

+ 2 - 1
pages/warehouse/components/requisitionList.vue

@@ -172,6 +172,7 @@
 				getApplystoragedetail({
 					applyId: this.curItem.id
 				}).then(async res => {
+					console.log(this.type, 'tttttttttttttttttttttttttttttttttttttttttttttt')
 					if (this.type == 2) {
 						// 出库
 						let data = await getHierarchyFifo({
@@ -184,7 +185,7 @@
 							})
 						})
 						if (data?.length > 0) {
-							uni.$emit('requisitionSelect', data, {
+							uni.$emit('requisitionSelectC', data, {
 								sourceBizNo: this.curItem.code,
 								bizType: this.curItem.sourceType,
 								assetType: res.map(item => item.rootCategoryLevelId).join(',')

+ 85 - 37
pages/warehouse/enterHouse/addStock.vue

@@ -14,21 +14,26 @@
 
 		<u-form labelPosition="left" :model="formData" :rules="rules" ref="formRef" labelWidth="240" labelAlign="right"
 			class="baseForm">
-			<u-form-item label="物品类型" class="required-form" borderBottom prop="assetType">
+			<u-form-item label="物品类型" class="required-form" borderBottom prop="assetTypeName">
 				<view :style="{ color: assetTypeName ? 'black' : '#c0c4cc' }" class="assetType_box" @click="openPicker">
 					{{ assetTypeName ? assetTypeName : '请选择产品类型' }}
 				</view>
 			</u-form-item>
-			<u-form-item label="入库场景" class="required-form" prop="bizType" borderBottom>
-				<uni-data-select v-model="formData.bizType" :localdata="sceneState"></uni-data-select>
-				<!-- <picker :disabled="!!(productList && productList.length)" @change="e => handlePicker(e, sceneState, 'bizType')" :value="pickerIndex" :range="sceneState" range-key="text">
-					<u-input :value="sceneStateFilter(formData.bizType)" :disableColor="!!(productList && productList.length) ? '#F5F7FA' : '#fff'" placeholder="请选择" disabled type="select" />
-				</picker>
-				<u-icon slot="right" name="arrow-right"></u-icon> -->
-			</u-form-item>
 			<u-form-item label="来源单据" prop="documentSource" borderBottom>
 				<u-input type="text" placeholder="请输入" v-model="formData.sourceBizNo" @click.native="goToRequisition" />
 			</u-form-item>
+			<u-form-item label="入库类型" class="required-form" prop="bizType" borderBottom>
+				<uni-data-select v-model="formData.bizType" :localdata="sceneState"
+					@change="changeType"></uni-data-select>
+				<!-- <picker :disabled="!!(productList && productList.length)"
+					@change="handlePicker(e, sceneState, 'bizType')" :value="pickerIndex" :range="sceneState"
+					range-key="text">
+					<u-input :value="sceneStateFilter(formData.bizType)"
+						:disableColor="!!(productList && productList.length) ? '#F5F7FA' : '#fff'" placeholder="请选择"
+						disabled type="select" />
+				</picker> -->
+				<!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
+			</u-form-item>
 			<u-form-item label="入库时间" prop="storageTime" borderBottom>
 				<view class="assetType_box" @click="timeShow = true">{{ storageTime ? formatter(storageTime) : '请选择' }}
 				</view>
@@ -98,36 +103,59 @@
 								</view>
 								<view class="item">
 									<u-form-item label="批次号" :prop="`productList.${index}.batchNo`" required>
-										<u--input :disabled="item.isSave" placeholder="请输入" border="surround"
-											v-model="item.batchNo"></u--input>
+										<!-- <u--input :disabled="item.isSave" placeholder="请输入" border="surround"
+											v-model="item.batchNo"></u--input> -->
+										<u-input :disabled="item.isSave" placeholder="请输入" style="height: 30px;"
+											v-model="item.batchNo" />
 									</u-form-item>
 								</view>
 								<view class="item">
-									<u-form-item label="数量" :prop="`productList.${index}.packingQuantity`" required>
+									<u-form-item label="数量" :prop="`productList.${index}.packingQuantity`" required
+										class="aa">
 										<u--input :disabled="item.isSave" placeholder="请输入" border="surround"
 											v-model="item.packingQuantity"
 											@change="computeNum(item, index, true)"></u--input>
 									</u-form-item>
 								</view>
 								<view class="item">
-									<u-form-item label="包装单位" :prop="`productList.${index}.packingUnit`" required>
-										<u--input :disabled="item.isSave" placeholder="请选择" border="surround"
+									<u-form-item label="包装单位" :prop="`productList.${index}.packingUnit`" required
+										class="dd">
+										<!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
 											v-model="item.packingUnit"
-											@click.native="showPackingUnitPicker(item, index)"></u--input>
+											@click.native="showPackingUnitPicker(item, index)"></u--input> -->
+										<view
+											:style="{ color: item.packingUnit ? 'black' : '#c0c4cc',marginLeft:'9px' }"
+											class="assetType_box" :disabled="item.isSave"
+											@click="showPackingUnitPicker(item, index)">
+											{{ item.packingUnit ? item.packingUnit : '请选择' }}
+										</view>
 									</u-form-item>
 								</view>
 								<view class="item">
-									<u-form-item label="仓库" :prop="`productList.${index}.warehouseId`" required>
-										<u--input :disabled="item.isSave" placeholder="请选择" border="surround"
+									<u-form-item label="仓库" :prop="`productList.${index}.warehouseName`" required
+										class="dd ">
+										<!-- 	<u--input :disabled="item.isSave" placeholder="请选择" border="surround"
 											v-model="item.warehouseName"
-											@click.native="showWarehousePicker(index)"></u--input>
+											@click.native="showWarehousePicker(index)"></u--input> -->
+										<view
+											:style="{ color: item.warehouseName ? 'black' : '#c0c4cc',marginLeft:'9px' }"
+											class="assetType_box" :disabled="item.isSave"
+											@click="showWarehousePicker( index)">
+											{{ item.warehouseName ? item.warehouseName : '请选择' }}
+										</view>
 									</u-form-item>
 								</view>
 								<view class="item w100">
-									<u-form-item label="供应商" :prop="`productList.${index}.supplierName`">
-										<u--input :disabled="item.isSave" placeholder="请选择" border="surround"
+									<u-form-item label="供应商" :prop="`productList.${index}.supplierName`" class="dd">
+										<!-- <u--input :disabled="item.isSave" placeholder="请选择" border="surround"
 											v-model="item.supplierName"
-											@click.native="showSupplierPicker(item, index)"></u--input>
+											@click.native="showSupplierPicker(item, index)"></u--input> -->
+										<view
+											:style="{ color: item.supplierName ? 'black' : '#c0c4cc',marginLeft:'9px' }"
+											class="assetType_box" :disabled="item.isSave"
+											@click="showSupplierPicker(item, index)">
+											{{ item.supplierName ? item.supplierName : '请选择' }}
+										</view>
 									</u-form-item>
 								</view>
 								<view class="item">
@@ -521,10 +549,9 @@
 			})
 			uni.$on('requisitionSelect', async (data, query) => {
 				console.log(data)
-				console.log(query)
 
 				this.formData.sourceBizNo = query.sourceBizNo
-				this.formData.bizType = query.bizType
+				this.formData.bizType = parseInt(query.bizType)
 				this.formData.extInfo.assetType = query.assetType.split(',')
 				let filterArray = this.formData.extInfo.assetType.map(item => {
 					return this.goodsLists.find(ite => ite.id == item).name
@@ -683,7 +710,7 @@
 				this.formData.outInDetailList = this.productList
 				let obj = uni.$u.deepClone(this.formData)
 				// 处理物品类型assetType
-				obj.extInfo.assetType = obj.extInfo.assetType.join(',')
+				obj.extInfo.assetType = obj.extInfo.assetType?.join(',')
 				// 处理仓库id
 				let warehouseId = []
 				let warehouseName = []
@@ -704,7 +731,7 @@
 					obj.isSkip = 0
 				}
 				// obj.isSkip = 1;
-				console.log(obj)
+				console.log(obj, '提交')
 				storage(obj)
 					.then(async res => {
 						console.log('入库成功', res)
@@ -913,6 +940,7 @@
 			},
 			// 生成包装
 			generateWrappers(row, productIndex, packingCodeList) {
+				console.log('row----', row)
 				console.log('是否拆包----', row.isUnpack)
 				console.log('包装规格----', row.packingSpecificationOption)
 				console.log('计量单位----', row.measureUnit)
@@ -924,24 +952,28 @@
 				if (this.formData.bizType == '1') {
 					// 生产入库
 					productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
-					this.curDateType = 'productionDate'
+					this.curDateType = productionDate
 				} else if (this.formData.bizType == '2') {
 					// 采购入库
 					purchaseDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`
-					this.curDateType = 'purchaseDate'
+					this.curDateType = purchaseDate
 				}
+				console.log(this.curDateType, '----时间')
 				// 判断包装单位和计量单位是否为不拆物料层规格
 				let packingBoolen = !!this.getDict(row.packingUnit).dictValue
 				let measureBoolen = !!this.getDict(row.measureUnit).dictValue
 				let num = row.packingQuantity
 				let filterArr = []
 				// 处理包装单位为KG类的情况
+				console.log('packingBoolen----', packingBoolen)
+				console.log('measureBoolen', measureBoolen)
 				if (packingBoolen) {
 					filterArr = row.packingSpecificationOption.filter(item => {
 						return item.packageUnit == row.packingUnit && item.packageUnit != item.conversionUnit
 					})
 					num = Math.ceil(row.packingQuantity / filterArr[0].packageCell)
 				} else {
+					console.log(row.isUnpack, 'sssssssssss')
 					if (row.isUnpack) {
 						if (measureBoolen) {
 							// 处理包装单位不为KG类,计量单位为KG类的情况
@@ -1378,6 +1410,9 @@
 					// key2: 'value2',
 				})
 			},
+			changeType(e) {
+				this.formData.bizType = e
+			},
 			// 抬头下拉信息保存
 			handlePicker(e, list, idKey, nameKey) {
 				console.log('e?.detail--------------', e)
@@ -1783,15 +1818,34 @@
 	.required-form-text {
 		/deep/ .u-form-item__body__right {
 			overflow: hidden;
+			// background-color: red;
+
 
 			.u-form-item__body__right__content {
 				width: 100%;
 				display: inline-block !important;
-				width: 100%;
 			}
 		}
 	}
 
+	// ::v-deep .listCont .u-input {
+	// 	height: 60rpx !important;
+	// }
+
+	::v-deep .dd .u-form-item__body__right {
+		border: 1px solid #e5e5e5 !important;
+		border-radius: 4px;
+		line-height: 60rpx;
+	}
+
+	.ellipsis {
+		max-width: 100%;
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+	}
+
+
 	.picList {
 		display: flex;
 		align-items: center;
@@ -1814,7 +1868,7 @@
 		}
 	}
 
-	/deep/.picList .u-image {
+	/deep/ .picList .u-image {
 		margin-right: 10rpx;
 		margin-bottom: 10rpx;
 	}
@@ -2109,22 +2163,16 @@
 
 		.u-input {
 			border: 1px solid rgb(229, 229, 229);
-			height: 15rpx !important;
+			height: 60rpx !important;
+			padding: 0 0 0 9px !important;
 		}
 
 		.item {
-			width: 47%;
+			width: 100%;
 			font-size: 28rpx;
 			margin-bottom: 10rpx;
 			margin-right: 3%;
 
-			// line-height: 45rpx;
-			// overflow: hidden;
-			// white-space: nowrap;
-			// text-overflow: ellipsis;
-			// -o-text-overflow: ellipsis;
-			// color: #000;
-			// display: flex;
 			/deep/.u-form-item__body {
 				padding: 0 !important;
 			}

+ 87 - 34
pages/warehouse/enterHouse/components/scanCodeList.vue

@@ -1,14 +1,17 @@
 <template>
 	<view class="mainBox">
 		<view class="main">
-			<uni-nav-bar fixed="true" statusBar="true" left-icon="back" right-icon="scan" title="扫码列表" @clickLeft="backAdd" @clickRight="HandlScanCode"></uni-nav-bar>
+			<uni-nav-bar fixed="true" statusBar="true" left-icon="back" right-icon="scan" title="扫码列表"
+				@clickLeft="backAdd" @clickRight="HandlScanCode"></uni-nav-bar>
 			<view class="wrapper">
 				<u-list class="listContent">
-					<checkbox-group v-for="(item, index) in listData" :key="index" @change.stop="e => selectVal(e, item, index)">
+					<checkbox-group v-for="(item, index) in listData" :key="index"
+						@change.stop="e => selectVal(e, item, index)">
 						<label>
 							<view class="listBox">
 								<view class="listBox-sel">
-									<checkbox :value="item.code" color="#fff" :disabled="item.disabled" :checked="item.checked" />
+									<uni-icons type="trash" size="20" color="red" @click="getDelete(index)"></uni-icons>
+									<!-- <checkbox :value="item.code" color="#fff" :disabled="item.disabled" :checked="item.checked" /> -->
 								</view>
 								<view class="listBox-con">
 									<view class="listBox-top">
@@ -47,20 +50,29 @@
 
 			<view class="footer">
 				<view class="bottom">
-					<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
-					<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选</checkbox>
+					<!-- <checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
+					<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
+					</checkbox> -->
 				</view>
-				<u-button type="success" size="small" class="u-reset-button" :disabled="!checkListLen" @click="jumpAdd">
-					<view class="selBtn">选择( {{ checkListLen }} )</view>
+				<u-button type="success" size="small" class="u-reset-button" @click="jumpAdd">
+					<view class="selBtn">确定</view>
 				</u-button>
+				<!-- 	<u-button type="success" size="small" class="u-reset-button" :disabled="!checkListLen" @click="jumpAdd">
+					<view class="selBtn">选择( {{ checkListLen }} )</view>
+				</u-button> -->
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	import { getDetailsByCode } from '@/api/warehouseManagement'
-	import { sceneState, outputSceneState } from '../../common'
+	import {
+		getDetailsByCode
+	} from '@/api/warehouseManagement'
+	import {
+		sceneState,
+		outputSceneState
+	} from '../../common'
 	export default {
 		data() {
 			return {
@@ -83,7 +95,9 @@
 				return this.listData.filter(el => el.checked).length
 			}
 		},
-		onLoad({ type }) {
+		onLoad({
+			type
+		}) {
 			this.type = type
 		},
 		onShow() {
@@ -127,38 +141,53 @@
 					}
 				})
 			},
-			//勾选
-			selectVal(e, val, index) {
-				this.$set(this.listData[index], 'checked', !this.listData[index].checked)
-				this.seletedAll = !this.listData.some(item => !item.checked)
-			},
-			//全选按钮
-			_seletedAll() {
-				if (!this.seletedAll) {
-					this.seletedAll = true
-					this.listData.map(item => {
-						this.$set(item, 'checked', true)
-					})
-				} else {
-					this.seletedAll = false
-					//this.checkListLen = 0;
-					this.listData.map(item => {
-						this.$set(item, 'checked', false)
-					})
-				}
-			},
+			// //勾选
+			// selectVal(e, val, index) {
+			// 	this.$set(this.listData[index], 'checked', !this.listData[index].checked)
+			// 	this.seletedAll = !this.listData.some(item => !item.checked)
+			// },
+			// //全选按钮
+			// _seletedAll() {
+			// 	if (!this.seletedAll) {
+			// 		this.seletedAll = true
+			// 		this.listData.map(item => {
+			// 			this.$set(item, 'checked', true)
+			// 		})
+			// 	} else {
+			// 		this.seletedAll = false
+			// 		//this.checkListLen = 0;
+			// 		this.listData.map(item => {
+			// 			this.$set(item, 'checked', false)
+			// 		})
+			// 	}
+			// },
 			//跳转回添加页面
 			async jumpAdd() {
+				// uni.$emit(
+				// 	'setSelectList',
+				// 	this.listData.filter(item => item.checked)
+				// )
 				uni.$emit(
 					'setSelectList',
-					this.listData.filter(item => item.checked)
+					this.listData
 				)
 				uni.navigateBack()
 			},
 			//返回添加页
 			backAdd() {
 				uni.navigateBack()
-			}
+			},
+			getDelete(index) {
+				uni.showModal({
+					title: '提示',
+					content: '是否删除当前数据',
+					success: res => {
+						if (res.confirm) {
+							this.listData.splice(index, 1)
+						}
+					}
+				})
+			},
 		}
 	}
 </script>
@@ -166,15 +195,18 @@
 <style lang="scss" scoped>
 	.mainBox {
 		height: 100vh;
+
 		.main {
 			height: 100%;
 			display: flex;
 			flex-direction: column;
 		}
+
 		.wrapper {
 			flex: 1;
 			overflow: hidden;
 		}
+
 		.searchBox {
 			padding: 10rpx 0;
 			box-sizing: border-box;
@@ -206,6 +238,7 @@
 				outline: none;
 				border: none;
 				width: 260rpx;
+
 				.icon-sousuo {
 					font-size: 22px;
 				}
@@ -215,6 +248,7 @@
 					margin-left: 10px;
 				}
 			}
+
 			.search-icon {
 				display: flex;
 				align-items: center;
@@ -222,6 +256,7 @@
 				font-size: 28rpx;
 				white-space: nowrap;
 				margin-left: 10rpx;
+
 				image {
 					width: 30rpx;
 					height: 30rpx;
@@ -280,6 +315,7 @@
 
 		.listContent {
 			height: 100% !important;
+
 			.listBox {
 				display: flex;
 				// height: 180rpx;
@@ -325,16 +361,19 @@
 						justify-content: space-between;
 						font-size: $uni-font-size-sm;
 						flex-wrap: wrap;
-						> view {
+
+						>view {
 							width: 50%;
 							overflow: hidden;
 							white-space: nowrap;
 							text-overflow: ellipsis;
 						}
+
 						.input_view {
 							display: flex;
 							align-items: center;
 							justify-content: center;
+
 							.u-input {
 								height: 36rpx;
 								padding: 0 !important;
@@ -342,12 +381,14 @@
 								border: 1px solid #ddd;
 							}
 						}
+
 						.w100 {
 							width: 100%;
 						}
 					}
 				}
 			}
+
 			.noDate {
 				height: 100%;
 			}
@@ -378,9 +419,11 @@
 				width: 150rpx;
 			}
 		}
+
 		.search-container {
 			width: 70vw;
 			padding: 30rpx 36rpx;
+
 			.footer {
 				position: absolute;
 				bottom: 0;
@@ -388,6 +431,7 @@
 				width: 100%;
 				display: flex;
 				box-shadow: 0 10rpx 30rpx 0 #000;
+
 				.btn {
 					width: 50%;
 					height: 80rpx;
@@ -396,20 +440,24 @@
 					display: flex;
 					justify-content: center;
 					align-items: center;
+
 					&.reset {
 						color: $j-primary-border-green;
 					}
 				}
 			}
 		}
+
 		.title {
 			font-weight: bold;
 			font-size: 30rpx;
 		}
+
 		.status-wrapper {
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
+
 			view {
 				background-color: rgba(242, 242, 242, 1);
 				height: 60rpx;
@@ -418,23 +466,28 @@
 				text-align: center;
 				width: 160rpx;
 				border: 1rpx solid rgba(242, 242, 242, 1);
+
 				&.active {
 					color: #157a2c;
 					border-color: rgba(21, 122, 44, 1);
 				}
 			}
 		}
+
 		/deep/.uni-date {
 			.uni-icons {
 				display: none;
 			}
+
 			.uni-date-x {
 				padding: 0;
+
 				view {
 					margin: 0 20rpx;
 				}
 			}
 		}
+
 		/deep/.uni-date__x-input,
 		/deep/.uni-easyinput__content-input {
 			height: 60rpx;
@@ -443,4 +496,4 @@
 			background-color: rgba(242, 242, 242, 1);
 		}
 	}
-</style>
+</style>

+ 5 - 4
pages/warehouse/enterHouse/details.vue

@@ -284,7 +284,7 @@
 	// import dictMixins from '@/mixins/dictMixins.js'
 	export default {
 		components: {
-			WarehouseChoose,
+			WarehouseChoose,  
 			baTreePicker,
 			UploadFileNew
 		},
@@ -322,10 +322,11 @@
 							value: 2
 						}
 					]
-				], // 质检状态 0未检 1已检
+				], // 质检状态0未检 1待检 2已检
 				qualityResults: {
-					1: '合格',
-					2: '不合格'
+					0: '未检',
+					1: '待检',
+					2: '已检'
 				}, // 质检结果 1合格 2不合格
 				curDateTypeLabel: {
 					purchaseDate: '采购日期',

+ 12 - 6
pages/warehouse/outHouse/addStock.vue

@@ -16,12 +16,13 @@
 					{{ assetTypeName ? assetTypeName : '请选择产品类型' }}
 				</view>
 			</u-form-item>
-			<u-form-item label="出库场景" class="required-form" prop="bizType" borderBottom>
-				<uni-data-select v-model="formData.bizType" :localdata="outputSceneState"></uni-data-select>
-			</u-form-item>
 			<u-form-item label="来源单据" prop="documentSource" borderBottom>
 				<u-input type="text" placeholder="请输入" v-model="formData.sourceBizNo" @click.native="goToRequisition" />
 			</u-form-item>
+			<u-form-item label="出库类型" class="required-form" prop="bizType" borderBottom>
+				<uni-data-select v-model="formData.bizType" :localdata="outputSceneState"
+					@change="changeType"></uni-data-select>
+			</u-form-item>
 			<u-form-item label="出库登记人" prop="createUserName" borderBottom>
 				<u-input disableColor="#ffffff" v-model="formData.extInfo.createUserName" placeholder="请选择" disabled
 					type="text" />
@@ -394,7 +395,7 @@
 		},
 		beforeDestroy() {
 			uni.$off('setSelectList')
-			uni.$off('requisitionSelect')
+			uni.$off('requisitionSelectC')
 		},
 		onLoad() {
 			this.getListItems() // 物品类型
@@ -420,9 +421,11 @@
 					}, 0)
 				}
 			})
-			uni.$on('requisitionSelect', async (data, query) => {
+			uni.$on('requisitionSelectC', async (data, query) => {
+				console.log(data, 'data')
+				console.log(query, 'queryqueryqueryqueryqueryqueryqueryqueryquery')
 				this.formData.sourceBizNo = query.sourceBizNo
-				this.formData.bizType = query.bizType
+				this.formData.bizType = parseInt(query.bizType)
 				this.formData.extInfo.assetType = query.assetType.split(',')
 				let filterArray = this.formData.extInfo.assetType.map(item => {
 					return this.goodsLists.find(ite => ite.id == item).name
@@ -497,6 +500,9 @@
 			}
 		},
 		methods: {
+			changeType(e) {
+				this.formData.bizType = e
+			},
 			goToRequisition() {
 				uni.navigateTo({
 					url: '/pages/warehouse/components/requisitionList?type=' + 2