|
|
|
@ -28,7 +28,6 @@ |
|
|
|
<div v-else-if="headerSelectFields[col.headerSelectKey]" class="fill-type-icon" |
|
|
|
:style="{ width: (templateFillType !== 'actFill') ? '60px' : 'auto' }">({{ |
|
|
|
headerSelectFields[col.headerSelectKey] }})</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
@ -58,29 +57,23 @@ |
|
|
|
<div v-if="!isBorder && col.label" class="mr-5"> |
|
|
|
{{ $t(col.label) }} |
|
|
|
</div> |
|
|
|
<template v-if="col.bodyType === 'input'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" type="input" |
|
|
|
@blur="onBlur(rowIndex, col.prop, $event)" @copy="onCopy(rowIndex, col)" |
|
|
|
class="body-input" :item="getBodyItem(col, rowIndex)" v-model="row[col.prop]" |
|
|
|
@change="onBodyValueChange(rowIndex, colIndex, $event)" |
|
|
|
:error="hasError(rowIndex, colIndex, col.prop)" |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" |
|
|
|
@beforeSaveRecord="(data, callback) => beforeSaveRecord(data, callback, rowIndex, col, row)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> |
|
|
|
</template> |
|
|
|
<template v-else-if="col.bodyType === 'inputNumber'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" type="inputNumber" |
|
|
|
@copy="onCopy(rowIndex, col)" class="body-input-number" |
|
|
|
:item="getBodyItem(col, rowIndex)" v-model="row[col.prop]" |
|
|
|
@blur="onBlur(rowIndex, col.prop, $event)" |
|
|
|
@change="onBodyValueChange(rowIndex, colIndex, $event)" |
|
|
|
:error="hasError(rowIndex, colIndex, col.prop)" |
|
|
|
@beforeSaveRecord="(data, callback) => beforeSaveRecord(data, callback, rowIndex, col, row)" |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> |
|
|
|
<template |
|
|
|
v-if="col.bodyType === 'input' || col.bodyType === 'inputNumber' || col.bodyType === 'select'"> |
|
|
|
<div class="flex flex1"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodyType" |
|
|
|
@blur="onBlur(rowIndex, col.prop, $event)" @copy="onCopy(rowIndex, col)" |
|
|
|
class="body-input" :item="getBodyItem(col, rowIndex)" |
|
|
|
v-model="row[col.prop]" |
|
|
|
@change="onBodyValueChange(rowIndex, colIndex, $event, row, col.bodyType)" |
|
|
|
:error="hasError(rowIndex, colIndex, col.prop)" |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.prop, $event)" |
|
|
|
@beforeSaveRecord="(data, callback) => beforeSaveRecord(data, callback, rowIndex, col, row)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.prop)" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
<!-- |
|
|
|
<template v-else-if="col.bodyType === 'select'"> |
|
|
|
<div class="flex flex1"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
@ -94,7 +87,7 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> --> |
|
|
|
<div class="flex flex1" v-else-if="col.bodyType === 'clickable'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.prop + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" type="clickable" class="body-clickable" |
|
|
|
@ -158,39 +151,17 @@ |
|
|
|
</div> |
|
|
|
<div class="m-l-5" :class="{ 'flex1': col.bodySubType !== 'button' }" |
|
|
|
v-if="isShowBodySub(col, row)"> |
|
|
|
<template v-if="col.bodySubType === 'inputNumber'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" type="inputNumber" |
|
|
|
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" |
|
|
|
@copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)" |
|
|
|
v-model="row[col.bodySubKey]" |
|
|
|
@change="onBodySubValueChange(rowIndex, colIndex, $event,)" |
|
|
|
:error="hasError(rowIndex, colIndex, col.bodySubKey)" |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> |
|
|
|
</template> |
|
|
|
<template v-if="col.bodySubType === 'input'"> |
|
|
|
<template v-if="col.bodySubType === 'inputNumber' || col.bodySubType === 'input'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" type="input" |
|
|
|
:fieldItemLabel="fieldItemLabel" :type="col.bodySubType" |
|
|
|
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" |
|
|
|
@copy="onCopy(rowIndex, col)" :item="getBodySubItem(col)" |
|
|
|
v-model="row[col.bodySubKey]" |
|
|
|
@change="onBodySubValueChange(rowIndex, colIndex, $event,)" |
|
|
|
:error="hasError(rowIndex, colIndex, col.bodySubKey)" |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> |
|
|
|
</template> |
|
|
|
<template v-else-if="col.bodySubType === 'select'"> |
|
|
|
<HandleFormItem :fieldKey="prefixKey + '_' + col.bodySubKey + '_' + rowIndex" |
|
|
|
:fieldItemLabel="fieldItemLabel" type="select" class="body-select" |
|
|
|
@blur="onSubBlur(rowIndex, col.bodySubKey, $event)" |
|
|
|
:item="getBodySubItem(col, rowIndex)" v-model="row[col.bodySubKey]" |
|
|
|
@change="onBodySubValueChange(rowIndex, colIndex, $event, row, 'select')" |
|
|
|
@change="onBodySubValueChange(rowIndex, colIndex, $event, row, col.bodySubType)" |
|
|
|
:error="hasError(rowIndex, colIndex, col.bodySubKey)" |
|
|
|
@update:error="onErrorUpdate(rowIndex, colIndex, col.bodySubKey, $event)" |
|
|
|
:orange-bg="hasOrangeBg(rowIndex, colIndex, col.bodySubKey)" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else-if="col.bodySubType === 'span'"> |
|
|
|
<div class="body-span"> |
|
|
|
{{ row[col.bodySubKey] }} |
|
|
|
|