From 17e1ae4795b1be3d4bfd7005fb1bb559d5e30115 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期四, 07 九月 2023 09:08:17 +0800
Subject: [PATCH] 小程序

---
 minipro_standard/pages_adjust/components/user.vue                         |   57 +++-
 minipro_standard/pages_adjust/components/MaterialSelect.vue               |  309 ++++++++++++++++++++++++++++
 minipro_standard/pages_adjust/pages/processPlan/processPlan.vue           |   84 ------
 minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue |  201 +++++++++++++++--
 4 files changed, 534 insertions(+), 117 deletions(-)

diff --git a/minipro_standard/pages_adjust/components/MaterialSelect.vue b/minipro_standard/pages_adjust/components/MaterialSelect.vue
new file mode 100644
index 0000000..242df5e
--- /dev/null
+++ b/minipro_standard/pages_adjust/components/MaterialSelect.vue
@@ -0,0 +1,309 @@
+<template>
+	<u-popup :show="show" :round="10" closeable @close="show = false">
+		<view class="material-content bbox p30 rp">
+			<view class="tc b f24 c2 mb20">閫夋嫨鐗╂枡</view>
+			<v-Search @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="鎼滅储鐗╂枡鍚嶇О/缂栫爜" />
+			<div class="content_total">鍏眥{form.total}}鏉℃暟鎹�</div>
+			<view class="scroll-content">
+				<!-- refresher-enabled="true"
+				:refresher-triggered="refreshing"
+				@refresherrefresh="onRefresh" -->
+				<scroll-view scroll-y="true" @scrolltolower="loadMore">
+					<view v-for="(item1, index) in list" :key="index" class="flex mb20" @click="jump(item1)">
+						<!-- <view class="img36 mr20 pt10">
+							<u-checkbox-group style="display: block;" name="">
+								<u-checkbox :checked="item1.isActive"></u-checkbox>
+							</u-checkbox-group>
+						</view> -->
+						<view class="fx1">
+							<div class="page_content_title_top">
+								<span>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
+							</div>
+							<div class="page_content_title_bottom">
+								<span class="green" v-if="item1.qualityType == 0">
+									鍚堟牸
+									<text class="c1" decode>{{ splite }}</text>
+								</span>
+								<span class="orange" v-else-if="item1.qualityType == 1">
+									涓嶈壇
+									<text class="c1" decode>{{ splite }}</text>
+								</span>
+								<span class="red" v-else-if="item1.qualityType == 2">
+									鎶ュ簾
+									<text class="c1" decode>{{ splite }}</text>
+								</span>
+								<span v-else>
+									-
+									<text class="c1" decode>{{ splite }}</text>
+								</span>
+								<span>
+									{{item1.procedureName ? item1.procedureName : '-'}}
+									<text class="c1" decode>{{ splite }}</text>
+								</span>
+								<span>{{item1.batch ? item1.batch : '-'}}</span>
+							</div>
+							<div class="mt20 plr25 ptb20 bg_f7 f26">
+								<div class="c2 mb10"><span class="c6">璐т綅锛�</span>{{ item1.locationName }}</div>
+								<div class="c2"><span class="c6">鏁伴噺锛�</span>{{ item1.num }}{{ item1.unitName }}</div>
+							</div>
+						</view>
+					</view>
+				</scroll-view>
+				<!-- <u-list @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower">
+					<u-list-item v-for="(item1, index) in list" :key="index">
+						
+					</u-list-item>
+				</u-list> -->
+			</view>
+			<!-- <view style="height: 98rpx;"></view> -->
+			<!-- <view class="">
+				<u-safe-bottom></u-safe-bottom>
+			</view> -->
+			<!-- <view class="fixedBottom bottom cY">
+				<view class="fx1 bbox plr30">
+					<u-checkbox-group style="display: block;" name="" @change="selectAll()">
+						<u-checkbox :checked="isAll" label="鍏ㄩ��"></u-checkbox>
+					</u-checkbox-group>
+				</view>
+				<view class="submit sbtn_green bbox tc" @click="submitAction">{{ `鎻愪氦(${totalNum})`}}</view>
+			</view> -->
+		</view>
+	</u-popup>
+</template>
+
+<script>
+	import vSearch from '@/components/Search.vue'
+	import { getStockByPlansForStandard } from '@/util/api/ExWarehouse'
+
+	export default {
+		name: "selectMaterial",
+		components: {
+			vSearch
+		},
+		data() {
+			return {
+				show: false,
+				splite: '&nbsp;|&nbsp;',
+				form: {
+					capacity: 50,
+					page: 0,
+					total: 0,
+					name: '',
+					smodelLabel: '',
+					categoryId: ''
+				},
+				list: [],
+				loading: false,
+				finished: false,
+				refreshing: false,
+				total: 0
+			};
+		},
+		props: {
+			deviceId: {
+				type: String,
+				default: ''
+			},
+			plansId: {
+				type: String,
+				default: ''
+			},
+			selected: {
+				type: Array,
+				default: []
+			}
+		},
+		computed: {
+			all() {
+				for (let i = 0; i < this.list.length; i++) {
+					if (!this.list[i].isActive) {
+						return false
+					}
+				}
+				return true
+			},
+			totalNum() {
+				let num = 0;
+				this.list.forEach(item => {
+					if (item.isActive) {
+						num += 1
+					}
+				})
+				return num;
+			}
+		},
+		methods: {
+			open() {
+				this.show = true
+				this.refreshing = false
+				this.finished = false
+				this.list = []
+				this.form.page = 0
+				this.form.total = 0
+				this.loadData()
+			},
+			jump(item) {
+				this.$emit('value', item)
+				this.show = false
+			},
+			// 鎼滅储鎻愪氦
+			submit() {
+				this.form.page = 0
+				this.finished = false
+				this.list = []
+				this.loadData()
+			},
+			// 鎼滅储妗�
+			searchInput(data) {
+				this.form.page = 0
+				this.finished = false
+				this.list = []
+				this.form.name = data
+				this.loadData()
+			},
+			loadData() {
+				if (!this.finished) {
+					this.loading = true;
+					this.form.page = this.form.page += 1
+					getStockByPlansForStandard({
+						capacity: this.form.capacity,
+						page: this.form.page,
+						model: {
+							materialName: this.form.name,
+							deviceId: this.deviceId,
+							plansId: this.plansId,
+							ids: this.selected.length > 0 ? this.selected.join(',') : ''
+						}
+					}).then(res => {
+						if (this.refreshing) {
+							this.list = []
+							this.refreshing = false;
+						}
+						this.loading = false;
+						if (res.code === 200 && res.data.records && res.data.records.length !== 0) {
+							this.form.total = res.data.total
+							res.data.records.forEach(element => {
+								element.isActive = false
+							})
+							this.list.push(...res.data.records)
+						} else {
+							this.finished = true;
+						}
+					}).catch(err => {
+						this.loading = false;
+						this.finished = true;
+						if (this.refreshing) {
+							this.list = []
+							this.refreshing = false;
+						}
+					})
+				}
+			},
+			loadMore() {
+				this.pages.page += 1
+				this.loadData()
+			},
+			onRefresh() {
+				if (this.refreshing) return
+				this.refreshing = true;
+				this.pages.page = 1
+				this.loadData()
+			},
+			selectAll() {
+				this.list.forEach(element => {
+					element.isActive = this.all
+				})
+			},
+			submitAction() {
+				this.show = false
+				let arr = []
+				this.list.forEach(element => {
+					if (element.isActive) {
+						arr.push(element)
+					}
+				})
+				this.$emit('value', arr)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.material-content {
+		display: flex;
+		flex-direction: column;
+		height: 1200rpx;
+		box-sizing: border-box;
+
+		.scroll-content {
+			height: calc(1100rpx - env(safe-area-inset-bottom));
+			overflow: scroll;
+		}
+	}
+
+	.content_total {
+		margin-top: 20rpx;
+		margin-bottom: 20rpx;
+		// padding: 24rpx 30rpx;
+		// background: #F7F7F7;
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #666666;
+	}
+
+	.page_content_title_top {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		span {
+			&:nth-child(1) {
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #222222;
+			}
+
+			&:nth-child(2) {
+				flex-shrink: 0;
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #333333;
+
+				// span {
+				// 	font-size: 24rpx;
+				// 	color: $nav-color;
+				// }
+			}
+		}
+	}
+
+	.page_content_title_bottom {
+		margin-top: 24rpx;
+
+		span {
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #666666;
+		}
+	}
+
+	.page_content_title {
+		display: flex;
+		flex-direction: column;
+		margin-bottom: 10rpx;
+
+
+
+
+	}
+
+	.bottom {
+		height: 98rpx;
+
+		.submit {
+			width: 272rpx;
+			height: 98rpx;
+			line-height: 98rpx;
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/minipro_standard/pages_adjust/components/user.vue b/minipro_standard/pages_adjust/components/user.vue
index ad496c9..4e82b0f 100644
--- a/minipro_standard/pages_adjust/components/user.vue
+++ b/minipro_standard/pages_adjust/components/user.vue
@@ -5,11 +5,11 @@
 		</view>
 		<view class="content">
 			<view class="content_search">
-				<u-search :showAction="false" placeholder="鎼滅储濮撳悕" v-model="keyword"></u-search>
+				<u-search :showAction="false" placeholder="鎼滅储濮撳悕" v-model="form.name" @search="searchInput"></u-search>
 			</view>
-			<div class="content_total">鍏眥{total}}鏉℃暟鎹�</div>
+			<div class="content_total">鍏眥{form.total}}鏉℃暟鎹�</div>
 			<scroll-view class="content_list" scroll-y>
-				<div class="content_list_item" v-for="(item, index) in indexList" :key="index" @click="getVal(item)">
+				<div class="content_list_item" v-for="(item, index) in list" :key="index" @click="jump(item)">
 					<div class="content_list_item_name">
 						<span>{{item.name}}</span>
 					</div>
@@ -20,35 +20,60 @@
 </template>
 
 <script>
+	import { allUser } from '@/util/api/PlanningAPI'
 	export default {
 		props: {
 			show: Boolean
 		},
 		data() {
 			return {
-				keyword: '',
-				total: 0,
-				indexList: []
+				list: [],
+				loading: false,
+				finished: false,
+				refreshing: false,
+				form: {
+					capacity: 50,
+					page: 0,
+					total: 0,
+					name: ''
+				}
 			};
 		},
 		methods: {
-			getVal(item) {
+			// 鎼滅储妗�
+			searchInput(data) {
+				this.form.page = 0
+				this.finished = false
+				this.list = []
+				this.loadmore()
+			},
+			jump(item) {
 				this.$emit('value', item)
 			},
 			open() {
-				this.indexList = []
-				this.loadmore()
-			},
-			scrolltolower() {
+				this.list = []
+				this.form.page = 0
+				this.finished = false
+				this.list = []
 				this.loadmore()
 			},
 			loadmore() {
-				for (let i = 0; i < 20; i++) {
-					this.indexList.push({
-						id: i,
-						name: `鏉庝紵锝滅敓浜ч儴锝�${i}`
+				allUser({ name: this.form.name })
+					.then(res => {
+						if (res.code === 200 && res.data && res.data.length !== 0) {
+							this.form.total = res.data.length
+							this.list = res.data
+						} else {
+							this.finished = true;
+						}
+					}).catch(err => {
+						this.loading = false;
+						this.finished = true;
+						if (this.refreshing) {
+							this.list = []
+							this.refreshing = false;
+						}
 					})
-				}
 			},
 			close() {
 				this.$emit('close')
diff --git a/minipro_standard/pages_adjust/pages/processPlan/processPlan.vue b/minipro_standard/pages_adjust/pages/processPlan/processPlan.vue
index 66b5a4c..10b3746 100644
--- a/minipro_standard/pages_adjust/pages/processPlan/processPlan.vue
+++ b/minipro_standard/pages_adjust/pages/processPlan/processPlan.vue
@@ -44,6 +44,8 @@
 
 <script>
 	import Search from '@/components/Search.vue'
+	import { getList } from "@/util/api/PlanningAPI"
+	
 	export default {
 		components: {
 			Search
@@ -71,8 +73,12 @@
 				}).exec()
 			})
 		},
+		onLoad() {
+			this.getLists()
+		},
 		methods: {
 			clickItem(obj) {
+				uni.$emit('update', {obj})
 				uni.navigateBack({ delta: 1 });
 			},
 			// 鑾峰彇澶撮儴缁勪欢楂樺害
@@ -87,85 +93,15 @@
 				this.lists = []
 				this.getLists()
 			},
-			// 鐐瑰嚮鏍囩鎼滅储
-			clickTag(ids) {
-				this.listData.cateIds = ids
-				this.listData.page = 0
-				this.finished = false
-				this.lists = []
-				// this.getLists()
-			},
-			// 鑾峰彇鍒楄〃缁熻
-			pageCounts() {
-				pageCount({
-					factoryId: this.listData.departIds,
-					procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
-					startDate: this.listData.startDate,
-					endDate: this.listData.endDate,
-					statusList: this.listData.cateIds
-				}).then(res => {
-					if (res.code === 200 && res.data) {
-						this.tagList[0].num = res.data.allNum.toString()
-						this.tagList[1].num = res.data.startNum.toString()
-						this.tagList[2].num = res.data.ingNum.toString()
-						this.tagList[3].num = res.data.endNum.toString()
-					}
-				})
-			},
-			// 鑾峰彇宸ュ巶鏁版嵁
-			getOrganizations() {
-				getOrganization({
-					type: 1
-				}).then(res => {
-					if (res.code === 200 && res.data && res.data.length !== 0) {
-						res.data.forEach((item, i) => {
-							item.isActive = i === 0;
-						})
-						if (res.data.length > 0) {
-							this.factoryList = res.data
-							this.listData.departIds = this.factoryList[0].id
-							this.listData.procedureIds = ''
-							this.finished = false
-							this.getWorkingProcedures(this.factoryList[0].id)
-							this.getLists()
-							this.pageCounts()
-						}
-					}
-				})
-			},
-			// 鑾峰彇宸ュ簭鏁版嵁
-			getWorkingProcedures(orgId) {
-				this.data = []
-				getWorkingProcedure({
-						orgId
-					})
-					.then(res => {
-						if (res.code === 200 && res.data && res.data.length !== 0) {
-							res.data.forEach((item, i) => {
-								item.isActive = false;
-							})
-							this.data = res.data
-						}
-					})
-			},
 			// 鎼滅储寮规鎻愪氦
 			submit() {
-				let pmodelOrgId = []
-				this.data.forEach((item) => {
-					if (item.isActive) {
-						pmodelOrgId.push(item.id)
-					}
-				})
-				this.listData.procedureIds = pmodelOrgId
-				this.listData.page = 0
-				this.finished = false
-				this.lists = []
-				// this.getLists()
-				// this.pageCounts()
+				this.pageData.page = 0
+				this.finished.value = false
+				this.listData.value = []
+				this.getLists()
 			},
 			// 鑾峰彇璁″垝鍒楄〃鏁版嵁
 			getLists() {
-				console.log('getLists')
 				if (!this.finished) {
 					this.pageData.page = this.pageData.page + 1
 					this.loading = true
diff --git a/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue b/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue
index b2445d8..04c7879 100644
--- a/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue
+++ b/minipro_standard/pages_adjust/pages/reportingForWork/reportingForWork.vue
@@ -66,8 +66,8 @@
 											<text class="green" v-if="item.qualityType == 0">鍚堟牸&nbsp;/&nbsp;</text>
 											<text class="yellow" v-if="item.qualityType == 1">涓嶈壇&nbsp;/&nbsp;</text>
 											<text class="red" v-if="item.qualityType == 2">鎶ュ簾&nbsp;/&nbsp;</text>
-											<text>{{ item.locationName }}&nbsp;/&nbsp;</text>
-											<text>{{ item.batch }}</text>
+											<text>{{ item.locationName || '-' }}&nbsp;/&nbsp;</text>
+											<text>{{ item.batch || '-' }}</text>
 										</view>
 									</view>
 									<view class="bg_list_item_num_item_sr">
@@ -75,7 +75,7 @@
 										    placeholder="璇疯緭鍏�"
 										    border="surround"
 											type="number"
-											:customStyle="{width: '180rpx'}"
+											:customStyle="{width: '100%'}"
 										    v-model="item.num"
 											@input="inputwl(index)"
 										  ></u--input>
@@ -213,11 +213,11 @@
 		<!-- 鐢熶骇浜哄憳 -->
 		<user :show="userShow" @close="userShow = false" @value="onConfirm1" />
 		<!-- 鐢熶骇璁惧 -->
-		<u-picker :show="deviceShow" :columns="deviceList" keyName="name" @confirm="onConfirm" @cancel="onCancel"></u-picker>
+		<u-picker :show="deviceShow" :columns="deviceList" keyName="name" @confirm="onConfirm" @cancel="deviceShow = false"></u-picker>
 		<!-- 鏃堕棿 -->
 		<u-picker :show="TimeShow" :columns="columns" @confirm="onConfirm2" @cancel="TimeShow = false"></u-picker>
 		<!-- 鐗╂枡 -->
-		<selectMaterial ref="selectMaterial" @selectAction="getValue" />
+		<MaterialSelect ref="MaterialSelect" :plansId="String(plansId)" :selected="ids" :deviceId="String(deviceId)" @value="getValue" />
 		<!-- 涓嶈壇椤� -->
 		<u-popup :show="show" @close="show = false" :round="8" closeable zIndex="20000">
 			<view class="rp p40 contanir">
@@ -225,7 +225,7 @@
 				<view class="content bl_list">
 					<div class="bl_list_item" v-for="(item, i) in cateList" :key="i" @click="changeChecked(i)">
 						<div class="bl_list_item_left">
-							<u-checkbox-group>
+							<u-checkbox-group @change="poorSelection(item.active, i)">
 								<u-checkbox :checked="item.active" :label="item.name" :name="item.name"></u-checkbox>
 							</u-checkbox-group>
 						</div>
@@ -244,11 +244,13 @@
 
 <script>
 	import user from '../../components/user.vue'
-	import selectMaterial from '@/components/selectMaterial.vue'
+	import MaterialSelect from '../../components/MaterialSelect.vue'
+	import { mapState } from 'vuex'
+	import { getDeviceByCondition, getFindAll, queryOne, queryList, autoWorkReport, getIdPlansExt, categoryExtList } from '@/util/api/PlanningAPI'
 	export default {
 		components: {
 			user,
-			selectMaterial
+			MaterialSelect
 		},
 		data() {
 			return {
@@ -295,21 +297,22 @@
 			};
 		},
 		computed: {
+			...mapState(['userInfo']),
 			// 棰勮宸ヨ祫
 			expectedSalary() {
 				if (this.arrType.length === 0) return 0;
-				if (this.arrType[from.index].type == 0) {
+				if (this.arrType[this.from.index].type == 0) {
 					if (!this.from.qualified) return 0
-					if (this.arrType[from.index].unqualified == 1) {   // 鏄惁璁″叆涓嶈壇鍝�
+					if (this.arrType[this.from.index].unqualified == 1) {   // 鏄惁璁″叆涓嶈壇鍝�
 						let total = Number(this.from.qualified) + Number(this.from.undesirable)
 						return (total * (this.arrType[from.index].salary / 10 / 10)).toFixed(2)
 					} else {
-						return (Number(this.from.qualified) * (this.arrType[from.index].salary / 10 / 10)).toFixed(2)
+						return (Number(this.from.qualified) * (this.arrType[this.from.index].salary / 10 / 10)).toFixed(2)
 					}
 				} else {
 					if (!this.from.duration) return 0;
 					let h = (this.from.duration / 60 / 60).toFixed(2)
-					return (Number(h) * (this.arrType[from.index].salary / 10 / 10)).toFixed(2)
+					return (Number(h) * (this.arrType[this.from.index].salary / 10 / 10)).toFixed(2)
 				}
 			},
 			// 杈炬爣鐜�
@@ -317,32 +320,99 @@
 				if (this.arrType.length === 0) return 0;
 				if (!this.from.qualified && !this.from.undesirable) return 0;
 				if (!this.from.duration) return 0;
-				if (!this.arrType[from.index].num) return 0;
-				if (this.arrType[from.index].unqualified == 1) {   // 鏄惁璁″叆涓嶈壇鍝�
+				if (!this.arrType[this.from.index].num) return 0;
+				if (this.arrType[this.from.index].unqualified == 1) {   // 鏄惁璁″叆涓嶈壇鍝�
 					let a = ((Number(this.from.qualified) + Number(this.from.undesirable)) / (this.from.duration / 3600)).toFixed(2)
-					let b = (this.arrType[from.index].num / (this.arrType[from.index].times / 3600)).toFixed(2)
+					let b = (this.arrType[this.from.index].num / (this.arrType[this.from.index].times / 3600)).toFixed(2)
 					return ((Number(a) / Number(b)) * 100).toFixed(2)
 				} else {
 					let a = (this.from.qualified / (this.from.duration / 3600)).toFixed(2)
-					let b = (this.arrType[from.index].num / (this.arrType[from.index].times / 3600)).toFixed(2)
+					let b = (this.arrType[this.from.index].num / (this.arrType[this.from.index].times / 3600)).toFixed(2)
 					return ((Number(a) / Number(b)) * 100).toFixed(2)
 				}
 			}
+		},
+		onReady() {
+			this.from.userId = this.userInfo.id
+			this.form.userName = this.userInfo.realname
 		},
 		onLoad() {
 			let arr = []
 			for(let i = 0; i < 60; i++) {
 				arr.push(i)
 			}
+			this.getData()
 			this.columns = [arr, arr]
+			// 鎺ユ敹璁″垝
+			uni.$on('update', (data) => {
+				this.from.processPlan = data.obj
+				this.plansId = data.obj.id
+				this.from.deviceId = ''
+				this.from.deviceName = ''
+				this.deviceId = ''
+				this.total = data.obj.num - data.obj.workorderDistributNum
+				this.wuList = []
+				this.from.defective = []
+				this.from.defectiveName = ''
+				this.from.userName = ''
+				this.from.userId = ''
+				// 鑾峰彇璁惧
+				getDeviceByCondition({ procedureId: data.obj.procedureId })
+					.then(res1 => {
+						if (res1.code === 200) {
+							if (res1.data && res1.data.length > 0) {
+								this.deviceId = res1.data[0].id
+								this.from.deviceId = res1.data[0].id
+								this.from.deviceName = res1.data[0].name
+								this.deviceList = [res1.data]
+							}
+						}
+					})
+				// 鑾峰彇绫诲瀷
+				getIdPlansExt(data.obj.id)
+					.then(res2 => {
+						if (res2.code === 200) {
+							this.bomType = res2.data.bomType
+							this.hasBom = res2.data.hasBom
+						}
+					})
+				// 鑾峰彇宸ヨ祫缁╂晥鏁版嵁
+				queryList({
+					deleted: 0,
+					departId: data.obj.factoryId,
+					materialId: data.obj.materialId,
+					procedureId: data.obj.procedureId
+				}).then(result => {
+					if (result.code === 200) {
+						if (result.data && result.data.length > 0) {
+							result.data.forEach((item, index) => {
+								item.name = item.type == 0 ? '璁′欢' : '璁℃椂'
+								item.id = item.type
+								item.active = index == 0
+							})
+							this.arrType = result.data
+							console.log(this.arrType)
+						} else {
+							this.arrType = []
+						}
+					}
+				})
+			})
 		},
 		methods: {
+			poorSelection(val, i) {
+				this.cateList.forEach((item, index) => {
+					if (i === index) {
+						item.active = !item.active
+					}
+				})
+			},
 			// 鍒囨崲缁╂晥绫诲瀷
 			clickPerformanceType(i) {
 				this.from.index = i
 				this.arrType.forEach((item, index) => {
 					if (i === index) {
-						from.type = item.id
+						this.from.type = item.id
 					}
 					item.active = index === i
 				})
@@ -353,7 +423,7 @@
 				obj.total = val.num
 				this.wuList.unshift(obj)
 				let arr = this.wuList.map(item => item.id)
-				this.ids = arr.join(',')
+				this.ids = arr
 			},
 			// 鑾峰彇涓嶈壇椤圭洰
 			getData() {
@@ -371,9 +441,9 @@
 			},
 			// 閫夋嫨璁惧
 			onConfirm(e) {
-				this.from.deviceId = e.id
-				this.from.deviceName = e.name
-				this.deviceId = e.id
+				this.from.deviceId = e.value[0].id
+				this.from.deviceName = e.value[0].name
+				this.deviceId = e.value[0].id
 				this.from.userId = ''
 				this.from.userName = ''
 				// getFindAll({
@@ -403,15 +473,15 @@
 				let name = ''
 				for (let i = 0; i < this.cateList.length; i++) {
 					if (this.cateList[i].active) {
-						if (this.cateList[i].num <= 0) {
+						if (Number(this.cateList[i].num) <= 0) {
 							return uni.showToast({ title: '涓嶈壇鏁伴噺蹇呴』澶т簬0', icon: 'none', duration: 2000 });
 						}
-						total = total += this.cateList[i].num
+						total = total += Number(this.cateList[i].num)
 						arr.push(this.cateList[i])
 						name += this.cateList[i].name + this.cateList[i].num + '锛�'
 					}
 				}
-				if (total !== this.from.undesirable) return uni.showToast({ title: '涓嶈壇鏁板繀椤荤瓑浜庝骇鍑轰笉鑹暟', icon: 'none', duration: 2000 });
+				if (total !== Number(this.from.undesirable)) return uni.showToast({ title: '涓嶈壇鏁板繀椤荤瓑浜庝骇鍑轰笉鑹暟', icon: 'none', duration: 2000 });
 				this.from.defective = arr
 				this.from.defectiveName = name
 				this.show = false
@@ -450,7 +520,7 @@
 			openMaterial() {
 				if (!this.plansId) return uni.showToast({ title: '璇峰厛閫夋嫨宸ュ簭鐢熶骇璁″垝', icon: 'none', duration: 2000 });
 				if (!this.deviceId) return uni.showToast({ title: '璇峰厛閫夋嫨鐢熶骇璁惧', icon: 'none', duration: 2000 });
-				this.$refs.selectMaterial.open({})
+				this.$refs.MaterialSelect.open()
 			},
 			inputwl(i) {
 				if (this.wuList[i].num > this.wuList[i].total) {
@@ -543,6 +613,7 @@
 				}).then(res => {
 					if (res.code === 200) {
 						uni.showToast({ title: '鎶ュ伐鎴愬姛锛�', icon: 'success', duration: 2000 });
+						this.arrType = []
 						this.from.processPlan = null
 						this.from.deviceId = ''
 						this.from.deviceName = ''
@@ -830,7 +901,7 @@
 								}
 							}
 							.bg_list_item_num_item_wl {
-								flex-shrink: 0;
+								flex: 1;
 								display: flex;
 								flex-direction: column;
 								text {
@@ -888,6 +959,8 @@
 							}
 							.bg_list_item_num_item_sr {
 								// flex: 1;
+								flex-shrink: 0;
+								width: 230rpx;
 								display: flex;
 								align-items: center;
 								justify-content: flex-end;
@@ -911,6 +984,7 @@
 									font-weight: 400;
 									color: #333333;
 									padding: 0 30rpx;
+									margin-right: 20rpx;
 								}
 								.wulll {
 									width: 400rpx;
@@ -1042,7 +1116,8 @@
 						}
 					}
 					.bl_list_item_right {
-						flex: 1;
+						width: 200rpx;
+						flex-shrink: 0;
 						height: 50rpx;
 						text-align: right;
 						input {
@@ -1067,5 +1142,77 @@
 				}
 			}
 		}
+		.bl_list {
+			width: 100%;
+			height: calc(100% - 168rpx);
+			overflow-y: scroll;
+			margin-top: 30rpx;
+		
+			.bl_list_item {
+				width: 100%;
+				height: 96rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				border-bottom: 1rPX solid #E5E5E5;
+		
+				&:last-child {
+					border: none !important;
+				}
+		
+				.bl_list_item_left {
+					flex: 1;
+					display: flex;
+					align-items: center;
+		
+					input {
+						width: 30rpx;
+						height: 30rpx;
+						border: 1rpX solid #CCCCCC;
+						margin: 0 !important;
+					}
+		
+					span {
+						font-size: 30rpx;
+						color: #222222;
+						margin-left: 10rpx;
+					}
+				}
+		
+				.bl_list_item_right {
+					width: 200rpx;
+					flex-shrink: 0;
+					height: 50rpx;
+					text-align: right;
+		
+					input {
+						padding-left: 5rpx;
+						width: 180rpx;
+						height: 60rpx;
+						border-radius: 8rpx;
+						border: 1rpx solid #CCCCCC;
+						padding: 0 30rpx;
+						box-sizing: border-box;
+						text-align: right;
+						font-size: 28rpx;
+						color: #333333;
+						border-radius: 10rpx;
+						border: 1rPX solid #CCCCCC;
+		
+						&::-webkit-input-placeholder {
+							font-size: 28rpx;
+							font-family: PingFangSC-Regular, PingFang SC;
+							font-weight: 400;
+							color: #999999;
+						}
+					}
+				}
+			}
+		}
+		.bottom-view {
+			left: 40rpx;
+			right: 40rpx;
+			bottom: 0
+		}
 	}
 </style>

--
Gitblit v1.9.3