Browse Source

feat:[模板管理][update]

ouqian
luojie 1 month ago
parent
commit
cfb71c3048
2 changed files with 18 additions and 5 deletions
  1. +14
    -4
      src/components/Template/CustomTable.vue
  2. +4
    -1
      src/views/business/comps/template/comps/dl/DL014.vue

+ 14
- 4
src/components/Template/CustomTable.vue View File

@ -135,7 +135,7 @@
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" class="body-clickable"
sourceFrom="customTable" :item="getBodyItem(col, rowIndex)"
:value="row[col.prop]" :error="hasError(rowIndex, colIndex, col.prop)"
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row)"
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row, col.prop)"
@beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, col, row)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" />
@ -204,6 +204,16 @@
:value="row[col.bodySubKey]"
@clickButton="(e, data) => handleClickButton(e, data, col.bodySubKey, rowIndex, colIndex)" />
</template>
<div class="flex flex1" v-else-if="isRegent(col, 'bodySubType')">
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex"
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" class="body-clickable"
sourceFrom="customTable" :item="getBodySubItem(col, rowIndex)"
:value="row[col.bodySubKey]" :error="hasError(rowIndex, colIndex, col.bodySubKey)"
@onRegentSubmit="(data, inputValue) => onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row, col.bodySubKey)"
@beforeReagentSubmit="(data, callback) => onBeforeReagentSubmit(data, callback, col, row)"
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)"
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" />
</div>
</div>
</div>
</div>
@ -493,12 +503,12 @@ export default {
this.$emit("onHeaderRegentSubmit", { selectInfo: data, headerIndex, colIndex, headerFields: this.headerFields })
},
onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row) {
onRegentSubmit(data, inputValue, col, rowIndex, colIndex, row,key) {
// if (this.templateFillType !== 'actFill') {
// return
// }
this.updateDataSourceByRowIndex(rowIndex, { [col.prop]: inputValue })
this.$emit("onRegentSubmit", { selectInfo: data, key: col.prop, col, rowIndex, colIndex, rowData: row })
this.updateDataSourceByRowIndex(rowIndex, { [key]: inputValue })
this.$emit("onRegentSubmit", { selectInfo: data, key, col, rowIndex, colIndex, rowData: row })
},
isShowAddRos() {
if (this.showAddRow !== undefined) {

+ 4
- 1
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -440,7 +440,10 @@ export default {
label: 'template.dl.dl014.gspbh',
prop: 'gspbh',
bodyType: 'input',
bodyFillType: 'actFill'
bodyFillType: 'actFill',
bodySubType: 'gsp',
bodySubKey: 'gspbh1',
bodySubFillType: 'actFill'
},
{
label: 'template.dl.dl014.ysgspjrl',

Loading…
Cancel
Save