diff --git a/src/views/businessConfig/EditPayForm.vue b/src/views/businessConfig/EditPayForm.vue index ef6a8c1..859c1e8 100644 --- a/src/views/businessConfig/EditPayForm.vue +++ b/src/views/businessConfig/EditPayForm.vue @@ -173,7 +173,7 @@ export default { previewContent: '', // 预览内容 showEditDrawer: false, showPreviewModal: false, // 添加预览模态窗口控制变量 - currentTemplateIndex: 8, + currentTemplateIndex:3, editForm: { field: '', // Renamed from name to field name: '', // Renamed from label to name (Chinese name) @@ -465,14 +465,7 @@ export default {
\${handler}
-
-
- 附单据 - - -
-
-
附单据\${receipts}张
+
附单据
\${receipts}
@@ -676,14 +669,14 @@ export default {
-
\${getDepartment}
+
\${department}
事由
-
\${getReason}
+
\${reason}
@@ -692,14 +685,14 @@ export default {
-
\${getDate}
+
\${date}
就餐地点
-
\${getDiningLocation}
+
\${diningLocation}
@@ -709,7 +702,7 @@ export default {
-
\${getVisitorCount}
+
\${visitorCount}
金额(元) 餐费 @@ -717,7 +710,7 @@ export default {
-
\${getMealsFee}
+
\${mealsFee}
@@ -726,14 +719,14 @@ export default {
-
\${getAccompanyCount}
+
\${accompanyCount}
住宿费
-
\${getAccommodationFee}
+
\${accommodationFee}
@@ -742,14 +735,14 @@ export default {
-
\${getOperator}
+
\${operator}
审核人
-
\${getReviewer}
+
\${reviewer}
@@ -758,7 +751,7 @@ export default {
-
\${getRemarks}
+
\${remarks}
@@ -1719,8 +1712,9 @@ export default { return } - // 更新字段元数据 + // 更新字段元数据,保留所有必要的属性 this.fieldMetadata[this.editForm.field] = { + field: this.editForm.field, // 确保保留字段名 name: this.editForm.name, type: this.editForm.type, options: this.editForm.options @@ -1785,11 +1779,6 @@ export default { const controlRegex = new RegExp(`
[^<]*<[^>]*data-field="${fieldName}"[^>]*>[^<]*<\\/div>[^<]*
\\$\\{${fieldName}\\}<\\/div>`, 'g') newCodeContent = newCodeContent.replace(controlRegex, (match) => { - // 提取原有的字段名 - const fieldNameMatch = match.match(/]*>([^<]+)<\/td>/) - const originalFieldName = fieldNameMatch ? fieldNameMatch[1] : '' - - // 保留原有的字段名,只替换控件部分 return `
${controlHtml}
\${${fieldName}}
` }) diff --git a/src/views/businessConfig/contractConfig.vue b/src/views/businessConfig/contractConfig.vue index dbd8b50..6ad0798 100644 --- a/src/views/businessConfig/contractConfig.vue +++ b/src/views/businessConfig/contractConfig.vue @@ -123,7 +123,18 @@ - + + + + + + + +