소스 검색

refactor(process/detail):表单隐藏单号,申请人;重复表显示方式修改

HMY 1 년 전
부모
커밋
5177b1f9bd
1개의 변경된 파일79개의 추가작업 그리고 9개의 파일을 삭제
  1. 79 9
      pages/process/detail/index.vue

+ 79 - 9
pages/process/detail/index.vue

@@ -8,7 +8,7 @@
 					:label-width="125" :border="true">
 					<view v-for="(elem, index) in formElements" :key="index">
 						<uni-forms-item
-							v-if="!(elem.elementName.endsWith('审批') && '' == elem.defaultValue && ['0', undefined].includes(elem.canEdit)) && ('' != elem.defaultValue || 1 == elem.canEdit)"
+							v-if="!(elem.elementName.endsWith('审批') && '' == elem.defaultValue && ['0', undefined].includes(elem.canEdit)) && ('' != elem.defaultValue || 1 == elem.canEdit) && !(elem.elementName.endsWith('单号') || elem.elementName.endsWith('申请人'))"
 							:label="elem.elementName" :name="elem.elementId">
 							<view class="element_value_container">
 								<view v-if="'1' == elem.canEdit && '8' != elem.type" class="element_value">
@@ -111,10 +111,11 @@
 		</uni-card>
 		<view class="repeating_table">
 			<!-- 重复表 -->
-			<uni-card v-if="flowInfo.seModel == '0' && repeatingFormNotEmpty" spacing="0" padding="0">
+			<!-- <uni-card v-if="flowInfo.seModel == '0' && repeatingFormNotEmpty" spacing="0" padding="0">
 				<button @click="handleRepeatingForm" type="primary">查看明细</button>
-			</uni-card>
-			<uni-card v-else v-for="(table, tableIndex) in repeatingForm.elements" spacing="0" :key="tableIndex">
+			</uni-card> -->
+			<uni-card v-if="!(flowInfo.seModel == '0' && repeatingFormNotEmpty)"
+				v-for="(table, tableIndex) in repeatingForm.elements" spacing="0" :key="tableIndex">
 				<uni-forms label-position="left" :label-width="125" :border="true">
 					<uni-forms-item :name="elem.tableField" v-for="(elem, itemIndex) in table"
 						:label="repeatingForm.elementItem[itemIndex].elementName.slice(3)" :key="itemIndex">
@@ -144,7 +145,7 @@
 					</uni-row>
 				</view> -->
 			</uni-card>
-			<uni-popup v-if="flowInfo.seModel == '0' && repeatingFormNotEmpty" ref="repeatingFormPopup">
+			<!-- <uni-popup v-if="flowInfo.seModel == '0' && repeatingFormNotEmpty" ref="repeatingFormPopup">
 				<uni-card margin="0px" spacing="0px" padding="0px">
 					<view class="repeating_table_container">
 						<uni-table :border="true" stripe>
@@ -161,7 +162,38 @@
 						</uni-table>
 					</view>
 				</uni-card>
-			</uni-popup>
+			</uni-popup> -->
+		</view>
+		<!-- 明细 -->
+		<!-- <view class="repeating_table_detail2">
+			<uni-card v-if="flowInfo.seModel == '0' && repeatingFormNotEmpty">
+				<uni-section titleFontSize="1.3rem" title="明细" type="line"></uni-section>
+				<uni-forms ref="baseForm" :modelValue="baseFormData" v-for="(table, tableIndex) in repeatingForm.elements" :key="tableIndex">
+					<uni-forms-item  v-for="(item, index) in repeatingForm.elementItem"
+						:label="item.elementName.slice(3, 5)" :key="index">
+						<text>{{table[index].defaultValue}}</text>
+					</uni-forms-item>
+				</uni-forms>
+			</uni-card>
+		</view> -->
+		<view class="repeating_table_detail">
+			<uni-card v-if="flowInfo.seModel == '0' && repeatingFormNotEmpty">
+				<uni-section titleFontSize="1.3rem" title="明细" type="line"></uni-section>
+				<view class="repeating_table_container">
+					<uni-table :border="true" stripe>
+						<uni-tr>
+							<uni-th align="center" v-for="(item, index) in repeatingForm.elementItem" :key="index">
+								{{ item.elementName.slice(3, 5) }}
+							</uni-th>
+						</uni-tr>
+						<uni-tr v-for="(table, tableIndex) in repeatingForm.elements" :key="tableIndex">
+							<uni-td align="center" v-for="(elem, itemIndex) in table" :key="itemIndex">
+								{{ elem.defaultValue }}
+							</uni-td>
+						</uni-tr>
+					</uni-table>
+				</view>
+			</uni-card>
 		</view>
 		<!-- 附件 -->
 		<view v-for="(item, index) in fileList" :key="index">
@@ -316,7 +348,7 @@
 		tinsId: undefined,
 		// tinsObj: {}//存储流转最后一步的对象
 	})
-	onLoad(({ insId, tinsId, insName, control  }) => {
+	onLoad(({ insId, tinsId, insName, control }) => {
 		// 获取传入的标题参数
 		const title = insName || '流程信息';
 		processInfo.insId = insId
@@ -1005,7 +1037,7 @@
 	function validateRepeatingForm2() {
 		// 设置重复表校验数据
 		const filterElements = repeatingForm.value.elements.filter(item => item.canEdit == "1")
-		if (filterElements.length == 0) return true	
+		if (filterElements.length == 0) return true
 		repeatingFormsValue.value = filterElements.map((item, index) => {
 			return computed(() => {
 				const obj = {};
@@ -1310,9 +1342,47 @@
 				}
 			}
 		}
+		// ::v-deep .repeating_table_detail2{
+		// 	.uni-forms-item__content{
+		// 		margin: auto;
+		// 	}
+		// 	.uni-forms{
+		// 		border-top: 2px #eee solid;
+		// 	}
+		// 	.uni-forms-item__label {
+		// 		width: 125px !important;
+		// 		font-size: calc(1rem + 0px) !important;
+		// 		line-height: calc(1rem + 0px) !important;
+		// 		font-weight: 700;
+		// 	}		
+		// 	.uni-forms-item__content {
+		// 		font-size: calc(14px + (1rem - 16px)) !important;
+		// 		font-weight: 500;
+		// 		.uni-date {
+		// 			.uni-icons {
+		// 				font-size: calc(22px + 1.2*(1rem - 16px)) !important;
+		// 				font-weight: 500;
+		// 			}
+		// 		}
+		// 	}
+		// }
+
+		::v-deep .repeating_table_detail {
+			.uni-card {
+				padding: 0 !important;
+			}
+
+			.uni-card__content {
+				padding: 0 !important;
+			}
+
+			.uni-section {
+				margin: 10px 5px;
+			}
+		}
 
 		::v-deep .repeating_table_container {
-			width: 98vw;
+			width: 92vw;
 
 			.uni-table-scroll {
 				max-height: 80vh;