فهرست منبع

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app into dengfei

695593266@qq.com 4 ماه پیش
والد
کامیت
c9d53eb8ee

+ 4 - 0
enum/dict.js

@@ -12,7 +12,11 @@ export default {
   取样类型: "quality_method_code",
   计量单位: "measuring_uint",
 };
+export const numberList = [
 
+  'quality_method_code',
+  
+];
 //发货审核状态
 export const reviewStatusEnum = [
   {

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.3.76",
+    "versionName" : "V1.0.3.79",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {

+ 17 - 37
pages.json

@@ -1,5 +1,4 @@
 {
-
 	"easycom": {
 		"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
 	},
@@ -101,7 +100,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/home/wt/components/processTask",
 			"style": {
@@ -310,7 +308,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		// {
 		// 	"path": "pages/home/wt/components/feeApplication/taskForm",
 		// 	"style": {
@@ -319,7 +316,6 @@
 		// 		"navigationBarTextStyle": "white"
 		// 	}
 		// },
-
 		{
 			"path": "pages/home/backlog/result",
 			"style": {
@@ -336,7 +332,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/home/backlog/planNatureApproval",
 			"style": {
@@ -345,7 +340,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/home/backlog/approve_enter",
 			"style": {
@@ -634,7 +628,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/maintenanceWorkorder/detail/detail",
 			"style": {
@@ -1501,7 +1494,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		// mes
 		{
 			"path": "pages/production/report/index",
@@ -1527,7 +1519,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/production/order/index",
 			"style": {
@@ -1592,7 +1583,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/production/execute/extrusion/report",
 			"style": {
@@ -1625,7 +1615,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/production/execute/drying/report",
 			"style": {
@@ -1658,7 +1647,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/production/execute/heating/report",
 			"style": {
@@ -1708,7 +1696,6 @@
 			}
 		},
 		//  ===================  PDA  =======
-
 		{
 			"path": "pages/pda/workOrder/index/index",
 			"style": {
@@ -1717,7 +1704,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/picking/index/index",
 			"style": {
@@ -1726,7 +1712,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/picking/details",
 			"style": {
@@ -1735,7 +1720,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/feeding/index/index",
 			"style": {
@@ -1744,7 +1728,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/feeding/details",
 			"style": {
@@ -1752,7 +1735,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/picking/bill/index",
 			"style": {
@@ -1761,7 +1743,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/selfBuiltPickOrder/components/addPick",
 			"style": {
@@ -1770,7 +1751,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/material_return/index/index",
 			"style": {
@@ -1795,7 +1775,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/by_product_recovery/index/index",
 			"style": {
@@ -1804,7 +1783,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/selfBuiltPickOrder/index/index",
 			"style": {
@@ -1813,7 +1791,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/work_order_handover/index/index",
 			"style": {
@@ -1822,7 +1799,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/work_order_handover/detail/detail",
 			"style": {
@@ -1855,7 +1831,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/workOrder/search/index",
 			"style": {
@@ -1864,8 +1839,7 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
-				{
+		{
 			"path": "pages/pda/workOrder/search/newIndex",
 			"style": {
 				"navigationBarTitleText": "搜索",
@@ -1873,7 +1847,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/selfBuiltPickOrder/components/choosePickList",
 			"style": {
@@ -1882,7 +1855,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/feeding/bill/index",
 			"style": {
@@ -1890,7 +1862,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/selfBuiltPickOrder/components/selfBuiltPickOrderDetail",
 			"style": {
@@ -1912,7 +1883,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/feeding/outbound/index",
 			"style": {
@@ -1920,7 +1890,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/pda/jobBooking/index/index",
 			"style": {
@@ -2229,7 +2198,6 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
-
 		{
 			"path": "pages/saleManage/businessOpportunity/index",
 			"style": {
@@ -2237,14 +2205,16 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
-		}, {
+		},
+		{
 			"path": "pages/saleManage/businessOpportunity/add",
 			"style": {
 				"navigationBarTitleText": "商机新增",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
-		}, {
+		},
+		{
 			"path": "pages/saleManage/businessOpportunity/components/drawer",
 			"style": {
 				"navigationBarTitleText": "商机详情",
@@ -2267,7 +2237,8 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
-		}, {
+		},
+		{
 			"path": "pages/saleManage/saleOrder/components/drawer",
 			"style": {
 				"navigationBarTitleText": "订单详情",
@@ -2640,6 +2611,14 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "black"
 			}
+		},
+		{
+			"path": "pages/qms/inspectionWork/sampleList",
+			"style": {
+				"navigationBarTitleText": "样品列表",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "black"
+			}
 		}
 	],
 	"tabBar": {
@@ -2648,7 +2627,8 @@
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"fontSize": "14px",
-		"list": [{
+		"list": [
+			{
 				"pagePath": "pages/home/home",
 				"iconPath": "static/tab/home.png",
 				"selectedIconPath": "static/tab/home_.png",

+ 100 - 0
pages/index/CellTip.vue

@@ -0,0 +1,100 @@
+<template>
+	<view class="">
+		<view class="position" v-if="cellType=='1'">
+			<text class="tag"></text>
+			<text class="titles" v-text="title"></text>
+			<slot></slot>
+		</view>
+		<view class="list-cell" v-if="cellType=='2'">
+			<text class="list-cell-span" >
+				<text v-text="title"></text>
+				<text class="num" v-if="num<=99" v-text="num"></text>
+				<text class="num" v-if="num>99">99+</text>
+			</text>
+			<slot></slot>
+		</view>
+	</view>
+	
+</template>
+
+<script>
+	export default {
+		name: "CellTip",
+		props:{
+			title:{
+				type:String,
+				default:''
+			},
+			num:{
+				type:[String, Number],
+				default:''
+			},
+			cellType:{
+				type:[String, Number],
+				default:'1'
+			}
+		},
+		data() {
+			return {
+
+			};
+		}
+	}
+</script>
+
+
+<style lang="scss" scoped>
+	.position {
+		position: relative;
+		padding: 16rpx 24rpx;
+		margin: 0 24rpx;
+		margin-top: 12rpx;
+		display: flex;
+		align-items: center;
+		// background-color: #e8e8e8;
+		font-size: $uni-font-size-base;
+		color: $uni-text-color;
+		.tag {
+			display: inline-block;
+			background-color: $j-primary-border-green;
+			width: 8rpx;
+			height: 32rpx;
+			border-radius: 4rpx;
+		}
+		.titles {
+			font-size: 32rpx;
+			font-weight: bold;
+			margin-left: 16rpx;
+		}
+	}
+	.list-cell{
+		position: relative;
+		padding: 0 20rpx;
+		background-color: #FFFFFF;
+		font-size: $uni-font-size-base;
+		color: $uni-text-regular-color;
+		.list-cell-span{
+			padding: 0 20rpx;
+			position: relative;
+			display: inline-block;
+			height: 76rpx;
+			line-height: 76rpx;
+			border-bottom: 1px solid $j-primary-border-green;
+		}
+		.num{
+			padding: 0 8rpx;
+			height: 40rpx;
+			line-height: 40rpx;
+			position: absolute;
+			top: 8rpx;
+			right: -50rpx;
+			display: inline-block;
+			transform: scale(0.7);
+			color: #FFFFFF;
+			background-color: $uni-color-error;
+			border-radius: 20rpx;
+			text-align: center;
+		}
+	}
+	
+</style>

+ 6 - 5
pages/index/index.scss

@@ -55,13 +55,14 @@ page {
 
 /* 内容区域 - 减少顶部空白 */
 .content-wrapper {
-	padding-top: calc(var(--status-bar-height) + 80rpx);
-	padding-bottom: env(safe-area-inset-bottom);
+	padding-top: 80rpx;
+	padding-bottom: 40rpx;
+	background-color: #f0f0f0;
 }
 
 /* 模块卡片容器 */
 .nav {
-	margin: 0 24rpx 24rpx;
+	margin: 0 24rpx;
 	background-color: $uni-bg-color;
 	border-radius: 16rpx;
 	box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
@@ -88,14 +89,14 @@ page {
 			}
 
 			span {
-				font-size: 56rpx;
+				font-size: 60rpx;
 				color: $j-primary-border-green;
 				margin-bottom: 12rpx;
 				line-height: 1;
 			}
 
 			label {
-				font-size: 24rpx;
+				font-size: 30rpx;
 				color: $uni-text-color;
 				width: 90%;
 				text-align: center;

+ 1 - 1
pages/index/index.vue

@@ -251,7 +251,7 @@
 </template>
 
 <script>
-import CellTip from "@/components/CellTip.vue";
+import CellTip from "./CellTip.vue";
 import { statistics, qualityTodoByPda } from "@/api/myTicket";
 export default {
   components: {

+ 135 - 111
pages/qms/inspectionWork/addSample.vue

@@ -1,7 +1,6 @@
 <template>
 	<view>
-		<u-popup :show="visible" :round="0" :closeOnClickOverlay="false" :zIndex="99999"
-			@close="closePopup">
+		<u-popup :show="visible" :round="0" :closeOnClickOverlay="false" :zIndex="99999" @close="closePopup">
 			<view class="popup-content">
 				<view class="popup-header">
 					<text class="popup-title">{{ title }}</text>
@@ -146,7 +145,8 @@
 							<view class="form-item">
 								<text class="label">请样目的</text>
 								<view class="value-wrap">
-									<u-input v-model="form.pleasePurpose" placeholder="请输入" border="none" :disabled="type=='view'"></u-input>
+									<u-input v-model="form.pleasePurpose" placeholder="请输入" border="none"
+										:disabled="type=='view'"></u-input>
 								</view>
 							</view>
 						</view>
@@ -154,21 +154,26 @@
 							<view class="form-item">
 								<text class="label">质检方式</text>
 								<view class="value-wrap">
-									<DictSelection v-model="form.qualityMode" @change="handleQualityModeChange"
-										:disabled="form.isFirstSampling != '1'||type=='view'" dictName="取样类型"></DictSelection>
+									<DictSelection v-model="form.qualityMode" @itemChange="handleQualityModeChange"
+										:disabled="form.isFirstSampling != '1'||type=='view'" dictName="取样类型">
+									</DictSelection>
 								</view>
 							</view>
 						</view>
 						<view class="form-row">
 							<view class="form-item">
 								<text class="label">记录方法</text>
-								<view class="value-wrap" @click="selectRecordingMethod"
-									:class="{ disabled: form.isFirstSampling != '1'||type=='view' }">
-									<u-input :value="recordingMethodList.find(item=>item.value==form.recordingMethod)&&recordingMethodList.find(item=>item.value==form.recordingMethod).label" placeholder="请选择" border="none" disabled>
-										<template #suffix>
-											<text class="arrow">›</text>
-										</template>
-									</u-input>
+								<view class="value-wrap">
+
+
+									<view class="select-input"
+										:class="{ disabled: form.isFirstSampling != '1'||type=='view' }"
+										@click="selectRecordingMethod">
+										<text
+											class="value-text">{{ recordingMethodList.find(item=>item.value==form.recordingMethod)&&recordingMethodList.find(item=>item.value==form.recordingMethod).label||'请选择' }}</text>
+										<text class="arrow">›</text>
+									</view>
+
 								</view>
 							</view>
 						</view>
@@ -177,14 +182,20 @@
 							<view class="form-row">
 								<view class="form-item">
 									<text class="label">请样类型</text>
-									<view class="value-wrap" @click="selectConditionType"
-										:class="{ disabled: form.isFirstSampling != '1'||type=='view' }">
-										<u-input :value="conditionTypeColumns.find(item=>item.value==form.conditionType)&&conditionTypeColumns.find(item=>item.value==form.conditionType).label"  placeholder="请选择" border="none"
-											disabled>
-											<template #suffix>
-												<text class="arrow">›</text>
-											</template>
-										</u-input>
+									<view class="value-wrap" @click="selectConditionType">
+
+
+										<view class="select-input"
+											:class="{ disabled: form.isFirstSampling != '1'||type=='view' }"
+											@click="selectConditionType">
+											<text
+												class="value-text">{{ conditionTypeColumns.find(item=>item.value==form.conditionType)&&conditionTypeColumns.find(item=>item.value==form.conditionType).label||'请选择' }}</text>
+											<text class="arrow">›</text>
+										</view>
+
+
+
+
 									</view>
 								</view>
 							</view>
@@ -193,20 +204,21 @@
 								<view class="form-item">
 									<text class="label">数量</text>
 									<view class="value-wrap">
-										<u-input v-model="form.quantity" :disabled="type=='view'" placeholder="请输入" border="none"></u-input>
+										<u-input v-model="form.quantity" :disabled="type=='view'" placeholder="请输入"
+											border="none"></u-input>
 									</view>
 								</view>
 							</view>
 							<view class="form-row" v-if="form.conditionType == 2">
 								<view class="form-item">
 									<text class="label">单位</text>
-									<view class="value-wrap" @click="selectUnit"
-										:class="{ disabled: form.isFirstSampling != '1'||type=='view' }">
-										<u-input v-model="form.unit" placeholder="请选择" border="none" disabled>
-											<template #suffix>
-												<text class="arrow">›</text>
-											</template>
-										</u-input>
+									<view class="value-wrap">
+										
+										<DictSelection v-model="form.unit" @itemChange="handleQualityModeChange"
+											:disabled="form.isFirstSampling != '1'||type=='view'" dictName="计量单位">
+										</DictSelection>
+										
+								
 									</view>
 								</view>
 							</view>
@@ -214,7 +226,8 @@
 								<view class="form-item">
 									<text class="label">条数</text>
 									<view class="value-wrap">
-										<u-input v-model="form.portion" :disabled="type=='view'" placeholder="请输入" border="none"></u-input>
+										<u-input v-model="form.portion" :disabled="type=='view'" placeholder="请输入"
+											border="none"></u-input>
 									</view>
 								</view>
 							</view>
@@ -223,20 +236,29 @@
 								<view class="form-item">
 									<text class="label">数量</text>
 									<view class="value-wrap">
-										<u-input v-model="form.portion" :disabled="type=='view'" placeholder="请输入" border="none"></u-input>
+										<u-input v-model="form.portion" :disabled="type=='view'" placeholder="请输入"
+											border="none"></u-input>
 									</view>
 								</view>
 							</view>
 							<view class="form-row" v-if="form.conditionType == 1">
 								<view class="form-item">
 									<text class="label">单位</text>
-									<view class="value-wrap" @click="selectPackingUnit"
-										:class="{ disabled: form.isFirstSampling != '1'||type=='view' }">
-										<u-input v-model="form.unit" placeholder="请选择" border="none" disabled>
-											<template #suffix>
-												<text class="arrow">›</text>
-											</template>
-										</u-input>
+									<view class="value-wrap"
+										>
+										
+										
+										<view class="select-input"
+											:class="{ disabled: form.isFirstSampling != '1'||type=='view' }"
+											@click="selectPackingUnit">
+											<text
+												class="value-text">{{ packingSpecificationOption.find(item=>item.id==form.packingUnit)&&packingSpecificationOption.find(item=>item.id==form.packingUnit).conversionUnit||'请选择' }}</text>
+											<text class="arrow">›</text>
+										</view>
+										
+										
+										
+							
 									</view>
 								</view>
 							</view>
@@ -282,30 +304,29 @@
 				</view>
 			</view>
 			<u-toast ref="uToast"></u-toast>
-		</u-popup>
 
-		<!-- 质检工单选择弹窗 -->
-		<inspectionWorkDialog ref="inspectionWorkDialog" @changeParent="changeParent"></inspectionWorkDialog>
+			<!-- 记录方法选择 -->
+			<u-picker :show="showRecordingMethodPicker"  keyName="label" :columns="[recordingMethodList]" @confirm="confirmRecordingMethod" @cancel="showRecordingMethodPicker = false"></u-picker>
+
+			<!-- 请样类型选择 -->
+			<u-picker :show="showConditionTypePicker" :columns="[conditionTypeColumns]" keyName="label" @confirm="confirmConditionType"
+				@cancel="showConditionTypePicker = false"></u-picker>
+
+		
+			<!-- 包装单位选择 -->
+			<u-picker :show="showPackingUnitPicker" keyName="label" :columns="[packingSpecificationOption.map(item=>{
+				return {
+					label:item.conversionUnit,
+					value:item.id
+				}
+			})]" @confirm="confirmPackingUnit"
+				@cancel="showPackingUnitPicker = false"></u-picker>
+		</u-popup>
 
-		<!-- 质检方式选择 -->
-		<u-picker :show="showQualityModePicker" :columns="qualityModeColumns" @confirm="confirmQualityMode"
-			@cancel="showQualityModePicker = false"></u-picker>
 
-		<!-- 记录方法选择 -->
-		<u-picker :show="showRecordingMethodPicker" :columns="[recordingMethodList]" @confirm="confirmRecordingMethod"
-			@cancel="showRecordingMethodPicker = false"></u-picker>
 
-		<!-- 请样类型选择 -->
-		<u-picker :show="showConditionTypePicker" :columns="[conditionTypeColumns]" @confirm="confirmConditionType"
-			@cancel="showConditionTypePicker = false"></u-picker>
 
-		<!-- 单位选择 -->
-		<u-picker :show="showUnitPicker" :columns="unitColumns" @confirm="confirmUnit"
-			@cancel="showUnitPicker = false"></u-picker>
 
-		<!-- 包装单位选择 -->
-		<u-picker :show="showPackingUnitPicker" :columns="packingUnitColumns" @confirm="confirmPackingUnit"
-			@cancel="showPackingUnitPicker = false"></u-picker>
 	</view>
 </template>
 
@@ -333,7 +354,7 @@
 		qualityWorkOrderCode: "",
 		qualityWorkOrderName: "",
 		isFirstSampling: "",
-    measureUnit:''
+		measureUnit: ''
 	};
 	import {
 		queryQualityInventory,
@@ -345,11 +366,13 @@
 		samplingrecordUpdate,
 		samplingRecordsPage,
 	} from "@/api/samplingRecords";
-	import inspectionWorkDialog from "./components/inspectionWorkDialog.vue";
-	import { getCodeList, getCode, parameterGetByCode } from '@/api/pda/picking.js'
+	import {
+		getCodeList,
+		getCode,
+		parameterGetByCode
+	} from '@/api/pda/picking.js'
 	export default {
 		components: {
-			inspectionWorkDialog,
 			DictSelection
 		},
 
@@ -383,12 +406,11 @@
 				],
 				selection: [],
 				// 弹窗相关
-				showQualityModePicker: false,
+
 				showRecordingMethodPicker: false,
 				showConditionTypePicker: false,
 				showUnitPicker: false,
 				showPackingUnitPicker: false,
-				qualityModeColumns: [],
 				recordingMethodPickerColumns: [],
 				conditionTypeColumns: [{
 						label: "请整样",
@@ -399,9 +421,7 @@
 						value: 2
 					},
 				],
-				unitColumns: [
-					[]
-				],
+		
 				packingUnitColumns: [
 					[]
 				],
@@ -520,24 +540,12 @@
 					this.getById(row.id);
 				}
 			},
-			// 选择质检工单
-			selectQualityWorkOrder() {
-				this.$refs.inspectionWorkDialog.open();
-			},
-			// 质检方式选择
-			selectQualityMode() {
-				if (this.form.isFirstSampling != "1") return;
-				this.qualityModeColumns = [this.sampleNumberList];
-				this.showQualityModePicker = true;
-			},
-			confirmQualityMode(e) {
-				this.form.qualityMode = e.value[0].value;
-				this.form.qualityModeName = e.value[0].label;
-				this.handleQualityModeChange(e.value[0].value);
-				this.showQualityModePicker = false;
-			},
+
+
+
 			// 记录方法选择
 			selectRecordingMethod() {
+				console.log(this.form.isFirstSampling, 'this.form.isFirstSampling')
 				if (this.form.isFirstSampling != "1") return;
 				// this.recordingMethodPickerColumns = [this.recordingMethodList];
 				this.showRecordingMethodPicker = true;
@@ -558,37 +566,20 @@
 				this.form.conditionTypeName = e.value[0].label;
 				this.showConditionTypePicker = false;
 			},
-			// 单位选择
-			selectUnit() {
-				if (this.form.isFirstSampling != "1") return;
-				let unitList = this.packingSpecificationOption.map(
-					(item) => item.conversionUnit,
-				);
-				this.unitColumns = [unitList];
-				this.showUnitPicker = true;
-			},
-			confirmUnit(e) {
-				this.form.unit = e.value[0];
-				this.showUnitPicker = false;
-			},
+
 			// 包装单位选择
 			selectPackingUnit() {
 				if (this.form.isFirstSampling != "1") return;
-				let unitList = this.packingSpecificationOption.map(
-					(item) => item.conversionUnit,
-				);
-				this.packingUnitColumns = [unitList];
+				// let unitList = this.packingSpecificationOption.map(
+				// 	(item) => item.conversionUnit,
+				// );
+				// this.packingUnitColumns = [unitList];
 				this.showPackingUnitPicker = true;
 			},
 			confirmPackingUnit(e) {
-				let selectedItem = this.packingSpecificationOption.find(
-					(item) => item.conversionUnit === e.value[0],
-				);
-				if (selectedItem) {
-					this.form.packingUnit = selectedItem.id;
-					this.form.packingUnitName = selectedItem.conversionUnit;
-					this.form.unit = selectedItem.conversionUnit;
-				}
+		
+				this.$set(this.form, 'packingUnit', e.value[0].value);
+				this.$set(this.form, 'unit', e.value[0].label);
 				this.showPackingUnitPicker = false;
 			},
 			parameterGetByCode() {
@@ -618,6 +609,7 @@
 					this.form.qualityWorkOrderCode = row.code;
 					this.form.qualityWorkOrderName = row.name;
 					this.workSampleQuantity = Number(row.sampleQuantity) || 0;
+					this.form.recordingMethod = this.form.recordingMethod || '1'
 
 					if (!list1?.length) {
 						this.form.isFirstSampling = 1;
@@ -687,7 +679,7 @@
 				this.form = {
 					...defForm,
 				};
-        this.workSampleQuantity=0
+				this.workSampleQuantity = 0
 				this.schemeList = [];
 				this.packingSpecificationOption = [];
 				this.sampleList = [];
@@ -695,9 +687,7 @@
 
 				this.visible = false;
 			},
-			changeParent(row) {
-				this.init(row);
-			},
+
 			async datasource(unit, isPackingUnit) {
 				const res = await queryQualityInventory({
 					qualityWorkerId: this.form.qualityWorkOrderId,
@@ -1135,8 +1125,11 @@
 				return true;
 			},
 
-			handleQualityModeChange(val) {
-				if (val == 1) {
+			handleQualityModeChange({
+				dictCode,
+				dictValue
+			}) {
+				if (dictCode == 1) {
 					this.updatePackingList();
 				} else {
 					this.sampleList = [];
@@ -1580,4 +1573,35 @@
 			flex: 1;
 		}
 	}
+
+	.select-input {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 20rpx 0;
+		min-height: 70rpx;
+		border-bottom: 1rpx solid #e5e5e5;
+		width: 100%;
+
+		&.disabled {
+			opacity: 0.6;
+		}
+
+		.value-text {
+			flex: 1;
+			font-size: 28rpx;
+			color: #333;
+
+			&.empty {
+				color: #999;
+			}
+		}
+
+		.arrow {
+			font-size: 40rpx;
+			color: #999;
+			line-height: 1;
+			margin-left: 20rpx;
+		}
+	}
 </style>

+ 46 - 29
pages/qms/inspectionWork/list.vue

@@ -32,32 +32,40 @@
 								<text v-else>
 									({{statusList1.find(row=>row.value==item.status).label}})
 								</text>
+								<text>
+									({{item.recordingMethod==1?'按质检项检':"按样品检"}})
+								</text>
 							</view>
 						</view>
 						<view class="text">检验项目:</view>
 						<view class="item_value" v-if="item.recordingMethod==1">
-							<view @click="goTo(item.id,row.id,item.sampleMeasureUnit,item,row)" 
+							<view @click="goTo(item.id,row.id,item.sampleMeasureUnit,item,row)"
 								v-for="(row,_index) in item.templateList" :key="item.inspectionName+index+'_'+_index"
 								:style="{background:row.status==1?'#19be6b':row.status==2?'#ff9900':row.status==3?'#ff9900':'#909399'}">
 								{{row.inspectionName}}
 							</view>
 						</view>
 						<view class="item_value" v-else>
-							<view @click="goTo(item.id,row.id,item.sampleMeasureUnit,item,row)" 
-								v-for="(row,_index) in item.templateList" :key="item.inspectionName+index+'_'+_index"
+							<view @click="goTo(item.id,row.id,item.sampleMeasureUnit,item,row)"
+								v-for="(row,_index) in item.qualitySampleList" :key="item.sampleCode+index+'_'+_index"
 								:style="{background:row.status==1?'#19be6b':row.status==2?'#ff9900':row.status==3?'#ff9900':'#909399'}">
-								{{row.inspectionName}}
+								{{row.sampleCode}}
 							</view>
 						</view>
-						<view class="text btnlist"
-							v-if="![1, 2].includes(item.status)&&(pageName=='myList'||!pageName)">操作:
-							<view>
-								<u-button v-if="item.isPendingSample == 1" type="primary" text="收样"
+						<view class="text btnlist" v-if="![1, 2].includes(item.status)">
+
+							操作:
+							<view style="display: flex;">
+								<u-button v-if="item.isPendingSample == 1&&(pageName=='myList'||!pageName)" type="primary" text="收样"
 									@click="sampleCollection(item)"></u-button>
-								<u-button
-									v-if="![1, 2].includes(item.status) &&item.sampleQuantity < item.total &&item.isPendingSample != 1"
+								<u-button style="margin-left: 5px;" v-if="item.sampleQuantity < item.total &&item.isPendingSample != 1&&(pageName=='myList'||!pageName)"
 									type="primary" text="请样" @click="addSampleOpen(item)"></u-button>
+								<u-button style="margin-left: 5px;" v-if="item.recordingMethod != 1" type="primary" text="批量质检"
+									@click="goTo(item.id,'',item.sampleMeasureUnit,item,{})">
+
+								</u-button>
 							</view>
+
 						</view>
 					</view>
 				</view>
@@ -87,7 +95,8 @@
 		getRequestentrustList,
 		sampleCollection,
 		getTaskmonadList,
-		verificationQualityInspector,checkByQualityWorkOrderId
+		verificationQualityInspector,
+		checkByQualityWorkOrderId
 	} from '@/api/inspectionWork/index.js'
 	export default {
 		components: {
@@ -147,8 +156,8 @@
 			this.requestDict('质检计划类型')
 
 		},
-		onLoad(){
-		
+		onLoad() {
+
 		},
 
 		methods: {
@@ -161,7 +170,7 @@
 					pageNum: 1,
 					size: this.tableList.length,
 					keyWord: this.keyWord,
-					recordingMethod: 1,
+					// recordingMethod: 1,
 				}
 				if (this.pageName) {
 					data.currentLoginUserId = this.userInfo.userId
@@ -169,10 +178,10 @@
 				if (this.pageName == 'myInspectionProjectEntrusted') {
 					data.approvalStatus = 2
 				}
-				if(this.way == 'todo') {
+				if (this.way == 'todo') {
 					data.status = 0
 				}
-				if(this.way == 'done') {
+				if (this.way == 'done') {
 					data.status = 1
 				}
 				let api = this.pageName == 'myInspectionProjectTask' ? getTaskmonadList : this.pageName ==
@@ -203,7 +212,7 @@
 					pageNum: this.page,
 					size: this.size,
 					keyWord: this.keyWord,
-					recordingMethod: 1,
+					// recordingMethod: 1,
 
 				}
 				if (this.pageName) {
@@ -212,10 +221,10 @@
 				if (this.pageName == 'myInspectionProjectEntrusted') {
 					data.approvalStatus = 2
 				}
-				if(this.way == 'todo') {
+				if (this.way == 'todo') {
 					data.status = 0
 				}
-				if(this.way == 'done') {
+				if (this.way == 'done') {
 					data.status = 1
 				}
 				let api = this.pageName == 'myInspectionProjectTask' ? getTaskmonadList : this.pageName ==
@@ -270,13 +279,21 @@
 						return
 					}
 				}
+				if (item.recordingMethod == 1) {
+					uni.navigateTo({
+						url: '/pages/qms/inspectionWork/inspectionProjectReport?workId=' + workId + '&projectId=' +
+							projectId + '&pageName=' + this.pageName + '&sampleMeasureUnit=' + sampleMeasureUnit
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/qms/inspectionWork/sampleList?workId=' + workId + '&projectId=' +
+							projectId + '&pageName=' + this.pageName
+					})
+				}
+
 
 
 
-				uni.navigateTo({
-					url: '/pages/qms/inspectionWork/inspectionProjectReport?workId=' + workId + '&projectId=' +
-						projectId + '&pageName=' + this.pageName + '&sampleMeasureUnit=' + sampleMeasureUnit
-				})
 			},
 			async addSampleOpen(row) {
 				const code = await verificationQualityInspector(row.id);
@@ -286,10 +303,10 @@
 				const is = await checkByQualityWorkOrderId(row.id);
 				if (is) {
 					this.$refs.uToast.show({
-							type: "error",
-							icon: false,
-							message: "此工单存在未处理完的请样记录,请检查!",
-						}, )
+						type: "error",
+						icon: false,
+						message: "此工单存在未处理完的请样记录,请检查!",
+					}, )
 					return;
 				}
 				this.$refs.addSampleRef.open('add', row);
@@ -305,7 +322,6 @@
 </script>
 
 <style lang="scss" scoped>
-	
 	.mainBox {
 		background-color: #f3f8fb
 	}
@@ -415,6 +431,7 @@
 	}
 
 	/deep/.u-button {
-		height: 60rpx
+		height: 60rpx;
+		width: auto;
 	}
 </style>

+ 1 - 1
pages/qms/inspectionWork/myList.vue

@@ -18,7 +18,7 @@
 		data() {
 			return {
 
-
+				
 
 
 			}

+ 693 - 0
pages/qms/inspectionWork/sampleList.vue

@@ -0,0 +1,693 @@
+<!-- 样品列表页面 -->
+<template>
+	<view class="mainBox">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" @clickLeft="handleClose">
+		</uni-nav-bar>
+
+		<!-- <view class="nav-placeholder"></view> -->
+
+		<view class="wrapper">
+			<scroll-view class="scroll-wrapper" scroll-y>
+				<view class="sample-list">
+					<view class="sample-item"
+						v-for="(sample, sampleIndex) in  projectId?tableData.filter(item=>item.id==projectId):tableData"
+						:key="sampleIndex">
+						<view class="sample-header" @click="toggleExpand(sampleIndex)">
+							<view class="sample-info">
+								<view class="info-row">
+									<text class="label">编码:</text>
+									<text class="value">{{ sample.categoryCode }}</text>
+								</view>
+								<view class="info-row">
+									<text class="label">名称:</text>
+									<text class="value">{{ sample.categoryName }}</text>
+								</view>
+								<view class="info-row" v-if="sample.batchNo">
+									<text class="label">批次号:</text>
+									<text class="value">{{ sample.batchNo }}</text>
+								</view>
+								<view class="info-row" v-if="sample.packageNo">
+									<text class="label">包装编码:</text>
+									<text class="value">{{ sample.packageNo }}</text>
+								</view>
+							</view>
+							<view class="expand-arrow" :class="{ expanded: expandedItems[sampleIndex] }">›</view>
+						</view>
+
+						<view class="quality-table-wrapper" v-if="expandedItems[sampleIndex]">
+							<scroll-view class="quality-table-scroll" scroll-x>
+								<view class="quality-table">
+									<view class="table-header">
+										<view class="table-cell">质检项名称</view>
+										<view class="table-cell">质检内容</view>
+										<view class="table-cell">质检结果</view>
+										<view class="table-cell">质检方案编码</view>
+										<view class="table-cell">质检方案名称</view>
+										<view class="table-cell">质检类型</view>
+										<view class="table-cell">工艺参数</view>
+									</view>
+									<view class="table-body">
+										<view class="table-row" v-for="(
+                        quality, qualityIndex
+                      ) in sample.qualitySampleTemplateList" :key="qualityIndex">
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.inspectionName }}</text>
+											</view>
+											<view class="table-cell">
+												<u-input v-model="quality.qualityResultContent" placeholder="请输入"
+													border="none" @change="
+                            handleInput(
+                              quality,
+                              quality.qualityResultContent,
+                              tableData,
+                            )
+                          " :class="{ warn: quality.qualityResults === 2 }" :disabled="
+                            type === 'detail' ||
+                            ((!pageName||pageName=='myList') && sample.correlationId)
+                          ">
+													<template #suffix v-if="quality.unitName">
+														<text class="unit">{{ quality.unitName }}</text>
+													</template>
+												</u-input>
+											</view>
+											<view class="table-cell">
+												<u-input disabled placeholder=" " v-if="type === 'detail' ||
+                            ((!pageName||pageName=='myList') && sample.correlationId)" border="surround" :value="
+												  quality.qualityResults &&
+												  qualityResultsList.find(
+												    (item) => item.value == quality.qualityResults,
+												  ).text
+												">
+												</u-input>
+												<uni-data-picker v-else v-model="quality.qualityResults"
+													placeholder="请选择" :localdata="qualityResultsList"
+													@change="qualityResultsListChange(tableData)" :clear-icon="false">
+												</uni-data-picker>
+
+											</view>
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.qualitySchemeTemplateCode }}</text>
+											</view>
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.qualitySchemeTemplateName }}</text>
+											</view>
+											<view class="table-cell">
+												<text class="cell-text"
+													:class="{ warn: quality.qualityResults === 2 }">{{ quality.categoryLevelClassName }}</text>
+											</view>
+											<view class="table-cell parameter-cell">
+												<text class="cell-text" :class="{ warn: quality.qualityResults === 2 }">
+													<text v-if="quality.textType == 3">
+														{{ quality.symbol }}
+														{{ quality.minValue }}-{{ quality.maxValue }}
+													</text>
+													<text v-else>
+														{{ quality.symbol }} {{ quality.defaultValue }}
+													</text>
+													{{ quality.unitName }}
+												</text>
+											</view>
+										</view>
+									</view>
+								</view>
+							</scroll-view>
+						</view>
+
+						<view class="quality-summary" v-if="sample.qualityResults">
+							<view style="min-width: 10px;margin-left: 16rpx;">
+								<text>
+									{{sample.status==1?'已检':sample.status==2?'已派单':sample.status==3?'已请托':'待检'}}
+								</text>
+
+							</view>
+							<view>
+								<text class="summary-label">样品质检结果:</text>
+								<text class="summary-value" :class="getQualityResultClass(sample.qualityResults)">
+									{{ formatQualityResult(sample.qualityResults) }}
+								</text>
+							</view>
+
+						</view>
+					</view>
+
+					<view class="empty-state" v-if="!tableData || tableData.length === 0">
+						<text>暂无数据</text>
+					</view>
+				</view>
+			</scroll-view>
+
+			<view style="height: 84rpx"></view>
+			<view class="footerButton">
+				<u-button @click="handleClose" type="default" text="返回"></u-button>
+				<u-button v-if="type != 'view'&&!isCorrelationId&&workData.status!=1" type="primary" @click="save" text="保存"></u-button>
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		getById,
+		update,
+		queryQualityInventory
+	} from "@/api/inspectionWork/index.js";
+	import {
+		handleInput,
+		qualityResultsListChange
+	} from "./unit.js";
+	export default {
+		components: {},
+		data() {
+			return {
+				title: "样品列表",
+				rowIndex: 0,
+				type: "",
+				pageName: "",
+				tableData: [],
+				handleInput,
+				qualityResultsListChange,
+				isCorrelationId: false,
+				expandedItems: {},
+				workData: {},
+				inventoryList: [],
+				projectId: '',
+				qualityResultsList: [{
+						text: "合格",
+						value: 1,
+					},
+					{
+						text: "不合格",
+						value: 2,
+					},
+					{
+						text: "让步接收",
+						value: 3,
+					},
+				],
+			};
+		},
+		onLoad(data) {
+
+
+			if (data.workId) {
+				this.projectId = data.projectId
+				this.type = data.type || "";
+				this.pageName = data.pageName || "";
+				getById(data.workId).then((res) => {
+					this.workData = res;
+					if (data.projectId) {
+						const qualitySampleList = res.qualitySampleList.filter(
+							(item) => item.id == data.projectId,
+						);
+						
+						if (qualitySampleList[0].correlationId && !['myInspectionProjectEntrusted',
+								'myInspectionProjectTask'
+							].includes(this.pageName)) {
+							this.isCorrelationId = true
+						}else{
+							qualitySampleList[0].status = 1
+						}
+					} else {
+						this.isCorrelationId = true
+						res.qualitySampleList.forEach(item => {
+							if (!item.correlationId || ['myInspectionProjectEntrusted',
+									'myInspectionProjectTask'
+								].includes(this.pageName)) {
+								this.isCorrelationId = false
+								item.status = 1
+							}
+						})
+					}
+
+
+
+					this.tableData = res.qualitySampleList.map(item => {
+						if (!item.qualitySampleTemplateList.length && res.templateList.length) {
+							item.qualitySampleTemplateList = JSON.parse(JSON.stringify(res.templateList))
+						}
+
+						return item
+					});
+				});
+
+				this.expandedItems = {};
+				this.getQueryQualityInventory(data.workId)
+			}
+		},
+		methods: {
+			async getQueryQualityInventory(workId) {
+				const res = await queryQualityInventory({
+					qualityWorkerId: workId,
+					size: -1
+				});
+
+				if (res.list.length > 0) {
+					this.inventoryList = res.list;
+				}
+			},
+			handleClose() {
+				uni.navigateBack();
+			},
+
+			handleConfirm() {
+				this.tableData.forEach((item) => {
+					if (!this.pageName && item.correlationId) {
+						return;
+					}
+					item.status = 1;
+				});
+
+				const pages = getCurrentPages();
+				const prevPage = pages[pages.length - 2];
+				if (prevPage) {
+					prevPage.$vm.handleConfirm &&
+						prevPage.$vm.handleConfirm(this.tableData, this.rowIndex);
+				}
+
+				uni.navigateBack();
+			},
+
+			toggleExpand(index) {
+				this.$set(this.expandedItems, index, !this.expandedItems[index]);
+			},
+			setNum() {
+
+				let sampleQualifiedNumber = 0; //  样品合格数
+				let sampleNoQualifiedNumber = 0; //  样品不合格数
+				let sampleQualificationRate = 0; //样品合格率
+				let sampleNoQualificationRate = 0; //样品不合格率
+
+				let qualifiedNumber = 0; // 合格数
+				let noQualifiedNumber = 0; //  不合格数
+				let qualificationRate = 0; //  合格率
+				let noQualificationRate = 0; //不合格率
+
+				this.tableData.forEach(item => {
+					if (item.qualityResults == 2) {
+						sampleNoQualifiedNumber += item.measureQuantity
+					}
+				})
+				sampleQualifiedNumber = this.workData.sampleQuantity - sampleNoQualifiedNumber
+
+				sampleQualificationRate =
+					((sampleQualifiedNumber / this.workData.sampleQuantity) * 100).toFixed(2) || '';
+				sampleNoQualificationRate =
+					((sampleNoQualifiedNumber / this.workData.sampleQuantity) * 100).toFixed(2) || '';
+				if (this.workData.qualityMode == 2 && this.workData.qualityResults == 2) {
+					qualifiedNumber = sampleQualifiedNumber
+					noQualifiedNumber = this.workData.total - sampleQualifiedNumber
+
+				} else {
+
+					qualifiedNumber = this.workData.total - sampleNoQualifiedNumber
+					noQualifiedNumber = sampleNoQualifiedNumber
+
+				}
+
+				qualificationRate =
+					((qualifiedNumber / this.workData.total) * 100).toFixed(2) || '';
+				noQualificationRate =
+					((noQualifiedNumber / this.workData.total) * 100).toFixed(2) || '';
+				this.workData.sampleQualifiedNumber = sampleQualifiedNumber
+				this.workData.sampleNoQualifiedNumber = sampleNoQualifiedNumber
+				this.workData.sampleQualificationRate = sampleQualificationRate
+				this.workData.sampleNoQualificationRate = sampleNoQualificationRate
+				this.workData.qualifiedNumber = qualifiedNumber
+				this.workData.noQualifiedNumber = noQualifiedNumber
+				this.workData.qualificationRate = qualificationRate
+				this.workData.noQualificationRate = noQualificationRate
+				// qualityMode
+			},
+			/* 保存编辑 */
+			save() {
+				this.workData.isUpdate = 1;
+				this.setNum()
+				let params = {
+					...this.workData,
+					sampleList: this.tableData,
+					planTemplateList: this.workData.templateList,
+					templateList: this.workData.templateList,
+					qualityInventoryList: this.inventoryList
+				};
+
+				update(params)
+					.then((msg) => {
+						uni.$emit('successInit')
+						this.back()
+					})
+					.catch((e) => {});
+			},
+			formatQualityResult(value) {
+				const map = {
+					1: "合格",
+					2: "不合格",
+					3: "让步接收",
+				};
+				return map[value] || "";
+			},
+
+			getQualityResultClass(value) {
+				return {
+					1: "result-pass",
+					2: "result-fail",
+					3: "result-concession",
+				} [value];
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.mainBox {
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		background-color: #f3f8fb;
+	}
+
+	.nav-placeholder {
+		height: calc(var(--status-bar-height, 0px) + 44px);
+	}
+
+	.wrapper {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+	}
+
+	.scroll-wrapper {
+		flex: 1;
+		height: 0;
+		padding: 20rpx;
+
+		.sample-list {
+			padding-bottom: 20rpx;
+
+			.sample-item {
+				background: #fff;
+				border-radius: 30rpx;
+				margin-bottom: 20rpx;
+				overflow: hidden;
+				//   box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
+				//   border: 1rpx solid #f0f0f0;
+
+				.quality-summary {
+					padding: 24rpx;
+					background: #fff;
+					border-top: 1rpx solid #f5f3f3;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					font-size: 28rpx;
+					font-weight: bold;
+
+					.summary-label {
+						color: #333;
+						margin-right: 20rpx;
+					}
+
+					.summary-value {
+
+						padding: 8rpx 20rpx;
+						border-radius: 8rpx;
+
+						&.result-pass {
+							color: #52c41a;
+							background: #f6ffed;
+						}
+
+						&.result-fail {
+							color: #ff4d4f;
+							background: #fff2f0;
+						}
+
+						&.result-concession {
+							color: #faad14;
+							background: #fffbe6;
+						}
+					}
+				}
+
+				.empty-state {
+					padding: 100rpx 0;
+					text-align: center;
+					font-size: 28rpx;
+					color: #999;
+				}
+
+				.sample-header {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					padding: 40rpx 40rpx 20rpx 40rpx;
+					background: #ffffff;
+					box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
+
+					.sample-info {
+						flex: 1;
+					}
+
+					.info-row {
+						display: flex;
+						margin-bottom: 8rpx;
+
+						&:last-child {
+							margin-bottom: 0;
+						}
+
+						.label {
+							font-size: 28rpx;
+							color: #333;
+
+							font-weight: 800;
+
+							margin-right: 10rpx;
+							min-width: 120rpx;
+						}
+
+						.value {
+							font-size: 26rpx;
+							color: #333;
+							flex: 1;
+							font-weight: 800;
+						}
+					}
+
+					.expand-arrow {
+						font-size: 40rpx;
+						color: #999;
+						margin-left: 20rpx;
+						transform: rotate(0deg);
+						transition: transform 0.3s;
+						background: #fff;
+						width: 48rpx;
+						height: 48rpx;
+						border-radius: 50%;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+
+						&.expanded {
+							transform: rotate(90deg);
+						}
+					}
+				}
+
+				.quality-table-wrapper {
+					// margin: 20rpx;
+					margin-top: 0;
+					// border-radius: 12rpx;
+					overflow: hidden;
+					// box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
+				}
+
+				// 自定义滚动条样式
+				::v-deep .quality-table-scroll ::-webkit-scrollbar {
+					width: 6rpx;
+					height: 6rpx;
+				}
+
+				::v-deep .quality-table-scroll ::-webkit-scrollbar-track {
+					background: #f1f1f1;
+					border-radius: 3rpx;
+				}
+
+				::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb {
+					background: #c1c1c1;
+					border-radius: 3rpx;
+				}
+
+				::v-deep .quality-table-scroll ::-webkit-scrollbar-thumb:hover {
+					background: #a8a8a8;
+				}
+
+				::v-deep .table-cell:last-child::-webkit-scrollbar {
+					width: 4rpx;
+				}
+
+				::v-deep .table-cell:last-child::-webkit-scrollbar-track {
+					background: #f9f9f9;
+					border-radius: 2rpx;
+				}
+
+				::v-deep .table-cell:last-child::-webkit-scrollbar-thumb {
+					background: #d9d9d9;
+					border-radius: 2rpx;
+				}
+
+				.quality-table-scroll {
+					width: 100%;
+				}
+
+				.quality-table {
+					min-width: 100%;
+					width: 1540rpx;
+					background: #fff;
+				}
+
+				.table-header {
+					display: flex;
+					background: #f5f5f5;
+					border-bottom: 2rpx solid #e5e5e5;
+
+					.table-cell {
+						padding: 24rpx 12rpx;
+						font-size: 26rpx;
+						font-weight: bold;
+						color: #333;
+						text-align: center;
+						border-right: 1rpx solid #e5e5e5;
+						white-space: nowrap;
+						flex-shrink: 0;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						background: #f5f5f5;
+						width: 200rpx;
+
+						&:last-child {
+							border-right: none;
+							background: #f5f5f5;
+						}
+
+						&:nth-child(2) {
+							width: 260rpx;
+						}
+
+						&:nth-child(3) {
+							width: 220rpx;
+						}
+
+						&:nth-child(7) {
+							width: 260rpx;
+						}
+					}
+				}
+
+				.table-body {
+					.table-row {
+						display: flex;
+						border-bottom: 1rpx solid #e5e5e5;
+						transition: background 0.2s;
+
+						&:nth-child(even) {
+							// background: #fafafa;
+						}
+
+						&:last-child {
+							border-bottom: none;
+						}
+
+						.table-cell {
+							padding: 20rpx 12rpx;
+							font-size: 24rpx;
+							// color: #666;
+							text-align: center;
+							border-right: 1rpx solid #e5e5e5;
+							white-space: nowrap;
+							flex-shrink: 0;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							width: 200rpx;
+
+							&:last-child {
+								border-right: none;
+								//   background: #f5f5f5;
+							}
+
+							&:nth-child(2) {
+								width: 260rpx;
+							}
+
+							&:nth-child(3) {
+								width: 220rpx;
+							}
+
+							&:nth-child(7) {
+								width: 260rpx !important;
+							}
+
+							.cell-text {
+								overflow: hidden;
+								text-overflow: ellipsis;
+								white-space: nowrap;
+								max-width: 100%;
+
+								&.warn {
+									color: #ff4d4f;
+								}
+							}
+
+							.unit {
+								font-size: 22rpx;
+								color: #999;
+								margin-left: 6rpx;
+							}
+
+							&.parameter-cell {
+								max-height: 120rpx;
+								overflow-y: auto;
+								align-items: flex-start;
+								padding: 16rpx 12rpx;
+								width: 200rpx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.footerButton {
+		width: 100%;
+		height: 84rpx;
+		display: flex;
+		position: fixed;
+		bottom: 0;
+		z-index: 10;
+		background-color: #fff;
+
+		/deep/.u-button {
+			height: 100%;
+		}
+
+		>view {
+			flex: 1;
+		}
+	}
+
+	.warn {
+		color: #ff4d4f !important;
+	}
+
+	/deep/.text-color {
+		font-size: 28rpx;
+	}
+</style>

+ 4 - 4
pages/qms/inspectionWork/unit.js

@@ -12,19 +12,19 @@ export function handleInput(item, value, arr) {
         } else {
           Vue.set(item, 'qualityResults', 1);
         }
-        // qualityResultsListChange(arr);
+        qualityResultsListChange(arr);
         return;
       }
       let key = mathematicalJudgment(item);
       Vue.set(item, 'qualityResults', key);
-      // qualityResultsListChange(arr);
+      qualityResultsListChange(arr);
     }
 
     if (item.textType == '3') {
       let num = Number(item.qualityResultContent);
       if (num == NaN) {
         Vue.set(item, 'qualityResults', 2);
-        // qualityResultsListChange(arr);
+        qualityResultsListChange(arr);
         return;
       }
       if (num >= Number(item.minValue) && num <= Number(item.maxValue)) {
@@ -32,7 +32,7 @@ export function handleInput(item, value, arr) {
         qualityResultsListChange(arr);
       } else {
         Vue.set(item, 'qualityResults', 2);
-        // qualityResultsListChange(arr);
+        qualityResultsListChange(arr);
       }
     }
   } else {

+ 13 - 8
store/modules/dict.js

@@ -1,4 +1,7 @@
-import dictEnum from '@/enum/dict'
+import dictEnum, {
+	numberList
+} from '@/enum/dict';
+
 import Vue from 'vue'
 // import {
 // 	get,
@@ -86,17 +89,18 @@ const actions = {
 			}
 		} else {
 			res = await getDictListByMainCode(code)
+			const isNumber = numberList.includes(code);
 			if (res?.code == 0) {
 				commit('ADD_DICT', {
 					code,
 					dict: res.data.map((item) => {
-					const arr = Object.entries(item)[0] || [];
+						const arr = Object.entries(item)[0] || [];
 
-					return {
-						dictCode:  arr[0],
-						dictValue: arr[1]
-					};
-				})
+						return {
+							dictCode: isNumber ? Number(arr[0]) : arr[0],
+							dictValue: arr[1]
+						};
+					})
 				})
 				return res.data
 			}
@@ -110,6 +114,7 @@ const actions = {
 	}, enumName) {
 		const code = dictEnum[enumName]
 		const res = await getDictListByMainCode(code)
+		const isNumber = numberList.includes(code);
 		if (res?.success) {
 			commit('ADD_DICT', {
 				code,
@@ -117,7 +122,7 @@ const actions = {
 					const arr = Object.entries(item)[0] || [];
 
 					return {
-						dictCode:arr[0],
+						dictCode: isNumber ? Number(arr[0]) : arr[0],
 						dictValue: arr[1]
 					};
 				})