|
@ -65,7 +65,8 @@ |
|
|
:width="headerItem?.tableForm?.width" |
|
|
:width="headerItem?.tableForm?.width" |
|
|
:min-width="headerItem?.tableForm?.minWidth || '200px'" |
|
|
:min-width="headerItem?.tableForm?.minWidth || '200px'" |
|
|
> |
|
|
> |
|
|
<el-form @submit.native.prevent |
|
|
<el-form |
|
|
|
|
|
@submit.native.prevent |
|
|
ref="TableBaseForm_Ref" |
|
|
ref="TableBaseForm_Ref" |
|
|
:model="row" |
|
|
:model="row" |
|
|
style="width: 100%" |
|
|
style="width: 100%" |
|
@ -92,7 +93,7 @@ |
|
|
:disabled="disabledInput(headerItem, row)" |
|
|
:disabled="disabledInput(headerItem, row)" |
|
|
style="flex: 1" |
|
|
style="flex: 1" |
|
|
@blur="inputStringBlur(headerItem, row[headerItem.field], row, index)" |
|
|
@blur="inputStringBlur(headerItem, row[headerItem.field], row, index)" |
|
|
@clear='clearInput(headerItem.field, row, index)' |
|
|
@clear="clearInput(headerItem.field, row, index)" |
|
|
@focus="inputStringFcous(headerItem)" |
|
|
@focus="inputStringFcous(headerItem)" |
|
|
/> |
|
|
/> |
|
|
<Icon |
|
|
<Icon |
|
@ -391,32 +392,34 @@ |
|
|
layout="total, prev, pager, next, jumper" |
|
|
layout="total, prev, pager, next, jumper" |
|
|
:total="tableData.length" |
|
|
:total="tableData.length" |
|
|
/> |
|
|
/> |
|
|
<div class="button flex" v-if="isShowButton || isShowReduceButtonSelection"> |
|
|
<div class="button flex" style="padding-top: 10px" v-if="isShowButton || isShowReduceButtonSelection"> |
|
|
<div class="p-12px" v-if="isShowButton" @click.stop="handleAddTable"> |
|
|
<el-button |
|
|
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer" /> |
|
|
type="primary" |
|
|
<div>{{ t('ts.添加明细') }}</div> |
|
|
link |
|
|
</div> |
|
|
v-if="isShowButton" |
|
|
<div class="p-12px" v-if="isShowReduceButtonSelection" @click.stop="handleSelectionDelete"> |
|
|
@click.stop="handleAddTable" |
|
|
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer" /> |
|
|
:disabled="sureDisabled" |
|
|
<div>{{ t('ts.批量删除') }}</div> |
|
|
:icon="CirclePlus" |
|
|
</div> |
|
|
size="large" |
|
|
<div |
|
|
> |
|
|
class="p-12px" |
|
|
<span>{{ t('ts.添加明细') }}</span> |
|
|
v-if=" |
|
|
</el-button> |
|
|
isShowTableFormSearch?.isShowTableFormSearch|| |
|
|
<el-button |
|
|
routeName == 'PurchaseMain' || |
|
|
type="primary" |
|
|
routeName == 'PurchaseMain' || |
|
|
link |
|
|
routeName == 'ProductionMain' || |
|
|
v-if="isShowReduceButtonSelection" |
|
|
routeName == 'ZZBJDeliverPlanMain' || |
|
|
@click.stop="handleSelectionDelete" |
|
|
routeName == 'DeliverPlanMain' || |
|
|
:icon="Remove" |
|
|
routeName == 'DeliverRequestMain' || |
|
|
size="large" |
|
|
routeName == 'ZZBJDeliverRequestMain' || |
|
|
|
|
|
routeName == 'UnplannedreceiptRequestMain'|| |
|
|
|
|
|
routeName == 'RepleinshRequestMain' |
|
|
|
|
|
|
|
|
|
|
|
" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-input v-model="keyWord" style="width: 240px" :placeholder="`请输入${isShowTableFormSearch?.label},多条数据逗号分隔`" /> |
|
|
<span>{{ t('ts.批量删除') }}</span> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
<div class="p-12px" v-if="isShowTableFormSearch?.isShowTableFormSearch"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="keyWord" |
|
|
|
|
|
style="width: 240px" |
|
|
|
|
|
:placeholder="`请输入${isShowTableFormSearch?.label},多条数据逗号分隔`" |
|
|
|
|
|
/> |
|
|
<el-button type="primary" style="margin-left: 10px" @click.stop="batchAdd">{{ |
|
|
<el-button type="primary" style="margin-left: 10px" @click.stop="batchAdd">{{ |
|
|
t('批量添加') |
|
|
t('批量添加') |
|
|
}}</el-button> |
|
|
}}</el-button> |
|
@ -429,6 +432,7 @@ |
|
|
const { t } = useI18n() // 国际化 |
|
|
const { t } = useI18n() // 国际化 |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' |
|
|
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' |
|
|
|
|
|
import { CirclePlus, Remove } from '@element-plus/icons-vue' |
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
// 是否显示添加按钮 |
|
|
// 是否显示添加按钮 |
|
|
isShowButton: { |
|
|
isShowButton: { |
|
@ -502,11 +506,16 @@ const props = defineProps({ |
|
|
type: String, |
|
|
type: String, |
|
|
required: false, |
|
|
required: false, |
|
|
default: '' |
|
|
default: '' |
|
|
|
|
|
}, |
|
|
|
|
|
// 添加明细是否可点击 |
|
|
|
|
|
sureDisabled: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: false |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
let isShowTableFormSearch = ref({}) |
|
|
let isShowTableFormSearch = ref({}) |
|
|
console.log(33333, props.tableFields) |
|
|
console.log(33333, props.tableFields) |
|
|
isShowTableFormSearch.value =props.tableFields.find(item=>item.isShowTableFormSearch) |
|
|
isShowTableFormSearch.value = props.tableFields.find((item) => item.isShowTableFormSearch) |
|
|
|
|
|
|
|
|
// 传递给父类 |
|
|
// 传递给父类 |
|
|
const emit = defineEmits([ |
|
|
const emit = defineEmits([ |
|
@ -535,7 +544,9 @@ const initSelectOptions = (headerItem,row) => { |
|
|
if (row[headerItem.field + 'InitOptions']) { |
|
|
if (row[headerItem.field + 'InitOptions']) { |
|
|
return row[headerItem.field + 'InitOptions'] |
|
|
return row[headerItem.field + 'InitOptions'] |
|
|
} else { |
|
|
} else { |
|
|
return headerItem.dictType ? getStrDictOptions(headerItem.dictType) : headerItem.tableForm.initOptions |
|
|
return headerItem.dictType |
|
|
|
|
|
? getStrDictOptions(headerItem.dictType) |
|
|
|
|
|
: headerItem.tableForm.initOptions |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//普通下拉改变事件 |
|
|
//普通下拉改变事件 |
|
|