提交 bcba3016 编写于 作者: Mosher's avatar Mosher

update:更新表格

上级 b200ec25
...@@ -33,32 +33,33 @@ ...@@ -33,32 +33,33 @@
{{/if}} {{/if}}
{{/eq}} {{/eq}}
{{#if item.enableRowEdit}} {{#if item.enableRowEdit}}
{{#each ctrl.psDEGridEditItems as | editColumn | }} {{#each ctrl.psDEGridEditItems as | editColumn | }}
{{#if (eq editColumn.codeName item.codeName)}} {{#if (eq editColumn.codeName item.codeName)}}
{{#if editColumn.resetItemName}} {{#if editColumn.resetItemName}}
resetItemName: "{{editColumn.resetItemName}}", resetItemName: "{{editColumn.resetItemName}}",
{{/if}} {{/if}}
{{#if editColumn.valueItemName}} {{#if editColumn.valueItemName}}
valueItemName: "{{editColumn.valueItemName}}", valueItemName: "{{editColumn.valueItemName}}",
{{/if}} {{/if}}
{{#each ctrl.psDEGridEditItemUpdates as | updateItem | }} {{!-- TODO编辑项模型存在问题 --}}
{{#if (eq updateItem.codeName editColumn.codeName)}} {{!-- {{#if editColumn.psDEGridEditItemUpdate}}
{{#with editColumn.psDEGridEditItemUpdate as | updateItem |}}
updateItem: { updateItem: {
name: "{{updateItem.name}}", name: "{{updateItem.name}}",
codeName: "{{updateItem.codeName}}", codeName: "{{updateItem.codeName}}",
{{#if updateItem.customCode}} {{#if updateItem.customCode}}
customCode: {{updateItem.customCode}}, customCode: {{updateItem.customCode}},
scriptCode: `{{updateItem.scriptCode}}`, scriptCode: `{{updateItem.scriptCode}}`,
{{else}} {{else}}
showBusyIndicator: {{updateItem.showBusyIndicator}}, showBusyIndicator: {{updateItem.showBusyIndicator}},
appDEMethod: "{{updateItem.psAppDEMethod.id}}", appDEMethod: "{{updateItem.psAppDEMethod.codeName}}",
updateDetails: [{{#each updateItem.psDEGEIUpdateDetails as | updateDetails | }}"{{updateDetails.name}}",{{/each}}], updateDetails: [{{#each updateItem.psDEGEIUpdateDetails as | updateDetails | }}"{{updateDetails.name}}",{{/each}}],
{{/if}} {{/if}}
}, },
{{/with}}
{{/if}} --}}
{{/if}} {{/if}}
{{/each}} {{/each}}
{{/if}}
{{/each}}
{{/if}} {{/if}}
}, },
{{/unless}} {{/unless}}
...@@ -36,8 +36,8 @@ export const ctrlState = { ...@@ -36,8 +36,8 @@ export const ctrlState = {
{ {
createDV: "{{editItem.createDV}}", createDV: "{{editItem.createDV}}",
createDVT: "{{editItem.createDVT}}", createDVT: "{{editItem.createDVT}}",
{{#if editItem.psAppDEField}} {{#if editItem.dataItemName}}
property: "{{lowerCase editItem.psAppDEField.codeName}}", property: "{{lowerCase editItem.dataItemName}}",
{{else}} {{else}}
property: "{{lowerCase editItem.codeName}}", property: "{{lowerCase editItem.codeName}}",
{{/if}} {{/if}}
...@@ -152,8 +152,8 @@ export const ctrlState = { ...@@ -152,8 +152,8 @@ export const ctrlState = {
{ {
updateDV: "{{editItem.updateDV}}", updateDV: "{{editItem.updateDV}}",
updateDVT: "{{editItem.updateDVT}}", updateDVT: "{{editItem.updateDVT}}",
{{#if editItem.psAppDEField}} {{#if editItem.dataItemName}}
property: "{{lowerCase editItem.psAppDEField.codeName}}", property: "{{lowerCase editItem.dataItemName}}",
{{else}} {{else}}
property: "{{lowerCase editItem.codeName}}", property: "{{lowerCase editItem.codeName}}",
{{/if}} {{/if}}
...@@ -203,11 +203,11 @@ export const ctrlState = { ...@@ -203,11 +203,11 @@ export const ctrlState = {
{{#eq editItem.codeName ruleItem.psDEGridEditItemName}} {{#eq editItem.codeName ruleItem.psDEGridEditItemName}}
{ {
validator: async (rule: any, value: any, callback: any, source: any) => { validator: async (rule: any, value: any, callback: any, source: any) => {
if (!source || isEmpty(source['{{#if editItem.valueItemName}}{{editItem.valueItemName}}{{else}}{{ruleItem.psDEGridEditItemName}}{{/if}}'])) { if (!source || isEmpty(source['{{#if editItem.valueItemName}}{{editItem.valueItemName}}{{else if editItem.dataItemName}}{{editItem.dataItemName}}{{else}}{{ruleItem.psDEGridEditItemName}}{{/if}}'])) {
return Promise.resolve(); return Promise.resolve();
} }
const { isPast, infoMessage } = Verify.verifyDeRules( const { isPast, infoMessage } = Verify.verifyDeRules(
'{{#if editItem.valueItemName}}{{editItem.valueItemName}}{{else}}{{ruleItem.psDEGridEditItemName}}{{/if}}', '{{#if editItem.valueItemName}}{{editItem.valueItemName}}{{else if editItem.dataItemName}}{{editItem.dataItemName}}{{else}}{{ruleItem.psDEGridEditItemName}}{{/if}}',
source, source,
{{> @macro/front-end/common/derules.hbs item=ruleItem.psDEFValueRule.getPSDEFVRGroupCondition}} {{> @macro/front-end/common/derules.hbs item=ruleItem.psDEFValueRule.getPSDEFVRGroupCondition}}
); );
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册