Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

hella_online_20240829
chenfang 3 months ago
parent
commit
5ecec40d3b
  1. 172
      src/components/SearchTable/src/SearchTable.vue
  2. 32
      src/components/Table/src/Table.vue
  3. 686
      src/components/TableForm/src/TableForm.vue
  4. 2
      src/components/XButton/src/ButtonBase.vue
  5. 4
      src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue
  6. 4
      src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue
  7. 4
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  8. 4
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue
  9. 4
      src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue
  10. 4
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue
  11. 4
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue
  12. 4
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue
  13. 4
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  14. 4
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  15. 4
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue
  16. 4
      src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue
  17. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  18. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  19. 5
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

172
src/components/SearchTable/src/SearchTable.vue

@ -1,5 +1,5 @@
<template>
<Dialog :title="dialogTitle" v-model="searchDialogVisible" :width="dialogWidth" >
<Dialog :title="dialogTitle" v-model="searchDialogVisible" :width="dialogWidth">
<!-- 搜索工作栏 -->
<ContentWrap v-if="searchQuery">
<Search :schema="searchSchema" @search="setSearchParamsRef" @reset="setSearchParamsRef" />
@ -14,7 +14,8 @@
:allSchemas="allSchemasRef"
/>
<ContentWrap>
<Table v-clientSearchTable
<Table
v-clientSearchTable
ref="searchTableRef"
:columns="tableColumns"
:data="tableObjectRef.tableList"
@ -30,13 +31,14 @@
:selectionTotal="multipleBol"
:reserveSelection="true"
row-key="id"
@rowClick="rowClick"
/>
</ContentWrap>
<template #footer>
<div class="flex items-center">
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="searchDialogVisible = false"> </el-button>
<slot name="actions"></slot>
</div>
</template>
@ -45,7 +47,7 @@
<script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons'
const props = defineProps({
showSearchTableQueryFields:{
showSearchTableQueryFields: {
type: Array,
required: false,
default: []
@ -63,23 +65,25 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12
const multipleBol = ref(false)
//
const HeadButttondata = ref(multipleBol.value?
[
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:[
defaultButtons.defaultFilterBtn(null) //
])
const HeadButttondata = ref(
multipleBol.value
? [
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null) //
]
: [
defaultButtons.defaultFilterBtn(null) //
]
)
/** 打开弹窗 */
const getListRef = ref()
const setSearchParamsRef = ref()
const tableObjectRef = ref()
const getPage:any = ref()
const getPage: any = ref()
const searchSchema = ref()
const tableColumns = ref()
const formFieldRef = ref()
@ -88,67 +92,88 @@ const typeRef = ref()
const rowRef = ref()
const allSchemasRef = ref()
const searchConditionRef = ref()
const searchTableSelectionsList = ref()//
const searchTableSelectionsList = ref() //
const searchQuery = ref(false)
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
const openData = (titleName: any, tableObject: any, allSchemas: any, multiple: any) => {
dialogWidth.value = '80%'
multipleBol.value = multiple
HeadButttondata.value = multiple?[
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:[
defaultButtons.defaultFilterBtn(null), //
]
dialogTitle.value = t(`ts.${titleName}`).replace('ts.','')
HeadButttondata.value = multiple
? [
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null) //
]
: [
defaultButtons.defaultFilterBtn(null) //
]
dialogTitle.value = t(`ts.${titleName}`).replace('ts.', '')
tableObjectRef.value = tableObject
searchDialogVisible.value = true
allSchemasRef.value = allSchemas
searchSchema.value = allSchemas.searchSchema
tableColumns.value = allSchemas.tableColumns
}
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any, searchTableSelections:any) => {
searchQuery.value = props.showSearchTableQueryFields.find(item=>item==formField)?true:false
const open = (
titleName: any,
allSchemas: any,
getApiPage: any,
formField: any,
searchField: any,
multiple: any,
type: any,
row: any,
searchCondition: any,
isCountRequestRe: any,
isConcatDetailSchemas = false,
detailSchemas: any,
searchTableSelections: any
) => {
searchQuery.value = props.showSearchTableQueryFields.find((item) => item == formField)
? true
: false
dialogWidth.value = '80%'
multipleBol.value = multiple
HeadButttondata.value = multiple?[
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null), //
]:
[
defaultButtons.defaultFilterBtn(null), //
]
HeadButttondata.value = multiple
? [
defaultButtons.defaultWhenPageBtn(null), //
defaultButtons.defaultUnselectPageBtn(null), //
// defaultButtons.defaultDeselectAllBtn(null), //
defaultButtons.defaultFilterBtn(null) //
]
: [
defaultButtons.defaultFilterBtn(null) //
]
searchDialogVisible.value = true
formFieldRef.value = formField
searchFieldRef.value = searchField
allSchemasRef.value = allSchemas
searchSchema.value = allSchemas.searchSchema
if(isConcatDetailSchemas){
if (isConcatDetailSchemas) {
//
console.log('detailSchemas',detailSchemas)
tableColumns.value = [...allSchemas?.tableColumns,...detailSchemas?.tableMainColumns].filter(item => (item.field !== 'action'))
}else{
tableColumns.value = allSchemas?.tableColumns.filter(item => (item.field !== 'action'))
console.log('detailSchemas', detailSchemas)
tableColumns.value = [...allSchemas?.tableColumns, ...detailSchemas?.tableMainColumns].filter(
(item) => item.field !== 'action'
)
} else {
tableColumns.value = allSchemas?.tableColumns.filter((item) => item.field !== 'action')
}
getPage.value = getApiPage
typeRef.value = type
rowRef.value = row
// dialogTitle.value = t('action.' + type)
dialogTitle.value = t(`ts.${titleName}`).replace('ts.','')
dialogTitle.value = t(`ts.${titleName}`).replace('ts.', '')
searchTableSelectionsList.value = searchTableSelections
const {tableObject, tableMethods } = useTable({
const { tableObject, tableMethods } = useTable({
getListApi: getPage.value //
})
tableObjectRef.value = tableObject
searchConditionRef.value = searchCondition
if (searchCondition) tableObjectRef.value.params = searchCondition;
if (searchCondition) tableObjectRef.value.params = searchCondition
//
const { getList , setSearchParams } = tableMethods
const { getList, setSearchParams } = tableMethods
setSearchParamsRef.value = setSearchParams
getListRef.value = getList
getList()
@ -157,7 +182,7 @@ const dialogWidth = ref('80%')
const changeDialogWidth = (width: any) => {
dialogWidth.value = width
}
const hiddenFilterButton = ()=>{
const hiddenFilterButton = () => {
HeadButttondata.value = []
}
@ -166,34 +191,34 @@ const searchFormClick = (searchData) => {
console.log(99, rowRef.value)
console.log(100, searchData)
console.log(101, searchConditionRef.value)
// 20240104 searchData.filters
// 20240104 searchData.filters
// 20240321 searchData
if (searchData.filters) {
if (searchConditionRef.value.filters) {
Object.keys(searchConditionRef.value.filters).forEach(key => {
Object.keys(searchConditionRef.value.filters).forEach((key) => {
searchData.filters.push(searchConditionRef.value.filters[key])
});
})
} else {
Object.keys(searchConditionRef.value).forEach(key => {
Object.keys(searchConditionRef.value).forEach((key) => {
searchData.filters.push({
action: "==",
action: '==',
column: key,
value: searchConditionRef.value[key]
})
});
})
}
} else {
if (searchConditionRef.value.filters) {
searchData.filters = searchConditionRef.value.filters
} else {
searchData.filters = []
Object.keys(searchConditionRef.value).forEach(key => {
Object.keys(searchConditionRef.value).forEach((key) => {
searchData.filters.push({
action: "==",
action: '==',
column: key,
value: searchConditionRef.value[key]
})
});
})
}
}
tableObjectRef.value.params = {
@ -203,7 +228,7 @@ const searchFormClick = (searchData) => {
getListRef.value() //
}
const buttonBaseClick = (val, item) => {
//
//
if (val == 'DeselectAll') {
//
searchTableRef.value.clearSelection()
@ -216,8 +241,7 @@ const buttonBaseClick = (val, item) => {
}
}
defineExpose({ open,openData,hiddenFilterButton ,changeDialogWidth}) // open
defineExpose({ open, openData, hiddenFilterButton, changeDialogWidth }) // open
// Table ref
const searchTableRef = ref()
@ -229,29 +253,47 @@ const submitForm = async () => {
formLoading.value = true
const selections = searchTableRef.value.selections
//
if(!multipleBol.value){
if(selections.length > 1 || selections.length == 0) {
if (!multipleBol.value) {
if (selections.length > 1 || selections.length == 0) {
message.warning('请选择一条数据!')
formLoading.value = false
return
}
//
}else{
if(selections.length == 0) {
} else {
if (selections.length == 0) {
message.warning('至少选择一条数据!')
formLoading.value = false
return
}
}
try {
searchDialogVisible.value = false
//
emit('searchTableSuccess', formFieldRef.value, searchFieldRef.value, selections, typeRef.value, rowRef.value)
emit(
'searchTableSuccess',
formFieldRef.value,
searchFieldRef.value,
selections,
typeRef.value,
rowRef.value
)
} finally {
formLoading.value = false
}
}
const rowClick = (row: any, column: any, event: Event) => {
const selected = searchTableRef.value?.elTableRef
?.getSelectionRows()
.some((item) => item.id === row.id)
if (!selected) {
searchTableRef.value?.elTableRef?.toggleRowSelection(row, true)
} else {
//
searchTableRef.value?.elTableRef?.toggleRowSelection(row, false)
}
}
</script>
<style scoped lang="scss">
</style>

32
src/components/Table/src/Table.vue

@ -63,7 +63,7 @@ export default defineComponent({
searchTableSelectionsList:[],//
selectionColor: propTypes.bool.def(false),
},
emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows'],
emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows','rowClick'],
setup(props, { attrs, slots, emit, expose }) {
const elTableRef = ref<ComponentRef<typeof ElTable>>()
@ -120,12 +120,24 @@ export default defineComponent({
const sortRef = ref()
//
const selectRow = ()=>{
console.log(currentPageRef.value,elTableRef.value?.getSelectionRows())
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows())
}
//
const selectAll = ()=>{
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows())
}
const rowClick = (row: any, column: any, event: Event)=>{
// const selected = elTableRef.value?.getSelectionRows().some(item => item.id === row.id)
// if (!selected) {
// elTableRef.value?.toggleRowSelection(row, true);
// } else {
// //
// elTableRef.value?.toggleRowSelection(row, false);
// }
// console.log(elTableRef.value?.getSelectionRows())
emit('rowClick',row,column,event)
}
//
const togglePageSelection = ()=>{
unref(getProps).data.forEach(row=>{
@ -165,7 +177,8 @@ export default defineComponent({
selectAll,
toggleAllSelection,
togglePageSelection,
clearSelection
clearSelection,
elTableRef
})
const pagination = computed(() => {
@ -388,6 +401,7 @@ export default defineComponent({
onSelect-all={selectAll}
onSelection-change={selectionChange}
onSort-change={sortChange}
onRow-click={rowClick}
{...unref(getBindValue)}
>
{{
@ -397,7 +411,7 @@ export default defineComponent({
}}
</ElTable>
{unref(getProps).selectionTotal ? (
<div class="mt-5px">已选{selections.value.length}条数据</div>
<div class="mt-15px float-left" style='height:32px;line-height:32px'>已选{selections.value.length}条数据</div>
):undefined}
{unref(getProps).pagination ? (
// update by Pagination
@ -416,18 +430,17 @@ export default defineComponent({
</script>
<style lang="scss">
.expandTable .el-table .tableHeader{
.expandTable .el-table .tableHeader {
--el-table-header-bg-color: #f5f5f5;
}
.expandTable .el-table .tableRow{
}
.expandTable .el-table .tableRow {
--el-table-tr-bg-color: #f5f5f5;
--el-bg-color:#f5f5f5;
--el-bg-color: #f5f5f5;
}
.el-table .selectionRow{
.el-table .selectionRow {
--el-table-tr-bg-color: var(--el-color-primary-light-9);
}
</style>
<style lang="scss" scoped>
:deep(.el-button.is-text) {
@ -439,5 +452,4 @@ export default defineComponent({
padding: 8px 4px;
margin-left: 0;
}
</style>

686
src/components/TableForm/src/TableForm.vue

@ -1,341 +1,420 @@
<!-- 附件组件 -->
<template>
<div class="table-form">
<el-table class="multipleTableComponents"
ref="TableBaseComponents_Ref"
v-loading="tableLoading"
<el-table
class="multipleTableComponents"
ref="TableBaseComponents_Ref"
v-loading="tableLoading"
:data="showTableData()"
:max-height="maxHeight"
row-key="id"
:border="border"
row-key="id"
:border="border"
@selection-change="tableSelectionChange"
@sort-change="tableSortChange"
@sort-change="tableSortChange"
@row-click="handleTableSelect"
>
<!-- 删除按钮多选 -->
<el-table-column fixed="left" type="selection" width="50" v-if="isShowReduceButtonSelection" :reserve-selection="true" />
<el-table-column
fixed="left"
type="selection"
width="50"
v-if="isShowReduceButtonSelection"
:reserve-selection="true"
/>
<!-- 删除按钮 -->
<el-table-column
fixed="left"
:width="50"
v-else-if="isShowReduceButton"
fixed="left"
:width="50"
v-else-if="isShowReduceButton"
v-slot="{ row, $index }"
>
<Icon icon="ep:remove" color="#757575" :size="26" style="cursor: pointer;margin-top: -16px;" @click="handleDeleteTable (row, $index)" />
<Icon
icon="ep:remove"
color="#757575"
:size="26"
style="cursor: pointer; margin-top: -16px"
@click.stop="handleDeleteTable(row, $index)"
/>
</el-table-column>
<!-- 多选 -->
<el-table-column
fixed="left"
<el-table-column
fixed="left"
v-if="selectionTable"
:reserve-selection="true"
type="selection"
:width="50"
:reserve-selection="true"
type="selection"
:width="50"
/>
<!-- 序号 -->
<el-table-column
type="index"
fixed="left"
:label="t(`ts.序号`)"
width="80"
:align="'center'"
v-if="isShowIndex"
<el-table-column
type="index"
fixed="left"
:label="t(`ts.序号`)"
width="80"
:align="'center'"
v-if="isShowIndex"
/>
<el-table-column
v-slot="{ row, $index }"
v-for="(headerItem) in tableFields.filter(item=>(!item.hidden))"
<el-table-column
v-slot="{ row, $index }"
v-for="headerItem in tableFields.filter((item) => !item.hidden)"
:key="headerItem"
:fixed="headerItem.tableForm?.fixed"
:label="t(`ts.${headerItem.label}`).replace('ts.','')" :prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'"
:fixed="headerItem.tableForm?.fixed"
:label="t(`ts.${headerItem.label}`).replace('ts.', '')"
:prop="headerItem.field"
:align="headerItem?.tableForm?.align || 'center'"
:sortable="headerItem?.tableForm?.sortable || false"
:width="headerItem?.tableForm?.width || '200px'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'">
<el-form
ref="TableBaseForm_Ref"
:model="row"
style="width: 100%;"
:width="headerItem?.tableForm?.width || '200px'"
:min-width="headerItem?.tableForm?.minWidth || 'auto'"
>
<el-form
ref="TableBaseForm_Ref"
:model="row"
style="width: 100%"
:rules="tableFormRules"
:class="tableFormRules ? '' : 'noRulesForm'">
:class="tableFormRules ? '' : 'noRulesForm'"
@click.stop=""
>
<!-- 字符串输入框 -->
<el-form-item
v-if="!headerItem?.tableForm?.type || headerItem?.tableForm?.type == 'InputString'"
:prop="headerItem.field" style="display: flex;align-items: center;">
<el-input :key="headerItem.field+$index"
:prop="headerItem.field"
style="display: flex; align-items: center"
>
<el-input
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
clearable
:type="headerItem?.tableForm?.inputType"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')"
:disabled="disabledInput(headerItem,row)"
style="flex:1"
@blur="inputStringBlur(headerItem, row[headerItem.field], row,index)"
:placeholder="
t(
`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`
).replace('ts.', '')
"
:disabled="disabledInput(headerItem, row)"
style="flex: 1"
@blur.stop="inputStringBlur(headerItem, row[headerItem.field], row, index)"
/>
<Icon
icon="ep:circle-close"
v-if="
headerItem?.tableForm?.isInpuFocusShow &&
headerItem?.tableForm?.disabled &&
headerItem?.tableForm?.clearable
"
style="position: absolute; right: 50px; cursor: pointer"
@click.stop="clearInput(headerItem.field, row, index)"
/>
<Icon icon="ep:circle-close" v-if="headerItem?.tableForm?.isInpuFocusShow && headerItem?.tableForm?.disabled&& headerItem?.tableForm?.clearable" style='position:absolute;right:50px;cursor: pointer;' @click="clearInput(headerItem.field,row,index)"/>
<el-button :key="headerItem.field+$index+'button'" v-if="headerItem?.tableForm?.isInpuFocusShow" @click="inpuFocus(headerItem,row,index)"><Icon icon="ep:search" size="14"/></el-button>
<el-button
:key="headerItem.field + $index + 'button'"
v-if="headerItem?.tableForm?.isInpuFocusShow"
@click.stop="inpuFocus(headerItem, row, index)"
><Icon icon="ep:search" size="14"
/></el-button>
</el-form-item>
<el-form-item v-if="headerItem?.tableForm?.type == 'slot'">
<el-form-item v-if="headerItem?.tableForm?.type == 'slot'">
<slot :row="row"></slot>
</el-form-item>
<!-- 金额输入框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'number'"
:prop="headerItem.field">
<el-input :key="headerItem.field+$index"
v-model="row[headerItem.field]"
clearable
type="number"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="itemIsDisabled(headerItem, row)"
style="width: 100%;"
@input="row[headerItem.field] = row[headerItem.field].replace(/[^\d\.-]/g, '')"
/>
</el-form-item>
<el-form-item v-if="headerItem?.tableForm?.type == 'number'" :prop="headerItem.field" >
<el-input
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
clearable
type="number"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="itemIsDisabled(headerItem, row)"
style="width: 100%"
@input.stop="row[headerItem.field] = row[headerItem.field].replace(/[^\d\.-]/g, '')"
@click.stop=""
@focus.stop=""
/>
</el-form-item>
<!-- 数字输入框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'InputNumber'"
:prop="headerItem.field">
<el-input-number
style="width: 100%;"
:key="headerItem.field+$index"
v-model="row[headerItem.field]"
<el-form-item
v-if="headerItem?.tableForm?.type == 'InputNumber'"
:prop="headerItem.field"
>
<el-input-number
style="width: 100%"
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:max="headerItem?.tableForm?.max"
:min="headerItem?.tableForm?.min"
:precision="headerItem?.tableForm?.precision"
:disabled="itemIsDisabled(headerItem, row)"
@change="(e)=>{inputNumberChange(headerItem.field, $index, row, e)}"
:min="headerItem?.tableForm?.min"
:precision="headerItem?.tableForm?.precision"
:disabled="itemIsDisabled(headerItem, row)"
@change.stop="
(e) => {
inputNumberChange(headerItem.field, $index, row, e)
}
"
/>
</el-form-item>
<!-- 下拉框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Select'"
:prop="headerItem.field">
<el-select :key="headerItem.field+$index"
v-model="row[headerItem.field]"
<el-form-item v-if="headerItem?.tableForm?.type == 'Select'" :prop="headerItem.field">
<el-select
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="headerItem?.tableForm.clearable || true"
:multiple="headerItem?.tableForm.multiple"
:size="headerItem?.tableForm.size"
:collapse-tags ="headerItem?.tableForm.collapseTags"
:collapse-tags-tooltip ="headerItem?.tableForm.collapseTagsTooltip"
:multiple-limit ="headerItem?.tableForm.multipleLimit"
:multiple="headerItem?.tableForm.multiple"
:size="headerItem?.tableForm.size"
:collapse-tags="headerItem?.tableForm.collapseTags"
:collapse-tags-tooltip="headerItem?.tableForm.collapseTagsTooltip"
:multiple-limit="headerItem?.tableForm.multipleLimit"
:disabled="itemIsDisabled(headerItem, row)"
:filterable="headerItem?.tableForm.filterable"
:filterable="headerItem?.tableForm.filterable"
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(headerItem.field, $event,row)"
@blur="tableFormSelectOnBlur(headerItem.field, $event,row, $index)">
<el-option
v-for="op in initSelectOptions(headerItem)"
:label="t(`ts.${op.label}`).replace('ts.','')"
@change.stop="formSelectChange(headerItem.field, $event, row)"
@blur.stop="tableFormSelectOnBlur(headerItem.field, $event, row, $index)"
>
<el-option
v-for="op in initSelectOptions(headerItem)"
:label="t(`ts.${op.label}`).replace('ts.', '')"
:value="op.value"
:key="op.value" />
:key="op.value"
/>
</el-select>
</el-form-item>
<!-- 下拉框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'SelectGroup'"
:prop="headerItem.field">
<el-select :key="headerItem.field+$index"
v-model="row[headerItem.field]"
<el-form-item
v-if="headerItem?.tableForm?.type == 'SelectGroup'"
:prop="headerItem.field"
>
<el-select
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="headerItem?.tableForm.clearable || true"
:multiple="headerItem?.tableForm.multiple"
:size="headerItem?.tableForm.size"
:collapse-tags ="headerItem?.tableForm.collapseTags"
:collapse-tags-tooltip ="headerItem?.tableForm.collapseTagsTooltip"
:multiple-limit ="headerItem?.tableForm.multipleLimit"
:multiple="headerItem?.tableForm.multiple"
:size="headerItem?.tableForm.size"
:collapse-tags="headerItem?.tableForm.collapseTags"
:collapse-tags-tooltip="headerItem?.tableForm.collapseTagsTooltip"
:multiple-limit="headerItem?.tableForm.multipleLimit"
:disabled="itemIsDisabled(headerItem, row)"
:filterable="headerItem?.tableForm.filterable"
:filterable="headerItem?.tableForm.filterable"
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(headerItem.field, $event,row)"
@blur="tableFormSelectOnBlur(headerItem.field, $event,row, $index)">
<el-option-group
v-for="group in initSelectOptions(headerItem)"
:key="group.type"
:label="t(`ts.${group.name}`).replace('ts.','')"
>
<el-option
v-for="item in group.options"
:key="item.value"
:label="t(`ts.${item.label}`).replace('ts.','')"
:value="item.value"
/>
</el-option-group>
@change.stop="formSelectChange(headerItem.field, $event, row)"
@blur.stop="tableFormSelectOnBlur(headerItem.field, $event, row, $index)"
>
<el-option-group
v-for="group in initSelectOptions(headerItem)"
:key="group.type"
:label="t(`ts.${group.name}`).replace('ts.', '')"
>
<el-option
v-for="item in group.options"
:key="item.value"
:label="t(`ts.${item.label}`).replace('ts.', '')"
:value="item.value"
/>
</el-option-group>
</el-select>
</el-form-item>
<!-- 时间选择器 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormTime'"
:prop="headerItem.field">
<el-time-picker :key="headerItem.field+$index"
v-model="row[headerItem.field]"
<el-form-item v-if="headerItem?.tableForm?.type == 'FormTime'" :prop="headerItem.field">
<el-time-picker
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="true"
:placeholder="headerItem?.tableForm?.placeholder || '选择时间'"
style="width: 100%" :disabled="itemIsDisabled(headerItem, row)"
style="width: 100%"
:disabled="itemIsDisabled(headerItem, row)"
:format="headerItem?.tableForm?.format || 'HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'HH:mm:ss'" />
:value-format="headerItem?.tableForm?.valueFormat || 'HH:mm:ss'"
/>
</el-form-item>
<!-- 日期选择器 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormDate'"
:prop="headerItem.field">
<el-form-item v-if="headerItem?.tableForm?.type == 'FormDate'" :prop="headerItem.field">
<el-date-picker
:key="headerItem.field+$index"
v-model="row[headerItem.field]"
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="true"
style="width: 100%"
:disabled="itemIsDisabled(headerItem, row)"
:disabled="itemIsDisabled(headerItem, row)"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期'"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DD'"
@change="formFormDateChange(headerItem.field, $event,row, $index)" />
@change.stop="formFormDateChange(headerItem.field, $event, row, $index)"
/>
</el-form-item>
<!-- 日期时间选择器 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormDateTime'"
:prop="headerItem.field">
<el-date-picker
:key="headerItem.field+$index"
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormDateTime'"
:prop="headerItem.field"
>
<el-date-picker
:key="headerItem.field + $index"
type="datetime"
:clearable="true"
v-model="row[headerItem.field]"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期时间'"
:placeholder="headerItem?.tableForm?.placeholder || '选择日期时间'"
style="width: 100%"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'"
:disabled="itemIsDisabled(headerItem, row)" />
:disabled="itemIsDisabled(headerItem, row)"
/>
</el-form-item>
<!--开始时间结束时间选择器 (原类型datetimerange已弃用 使用type+timeType结合方式)-->
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormTimerange'"
:prop="headerItem.field">
<el-date-picker :key="headerItem.field+$index"
<el-form-item
v-if="headerItem?.tableForm?.type == 'FormTimerange'"
:prop="headerItem.field"
>
<el-date-picker
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:clearable="true"
:disabled="itemIsDisabled(headerItem, row)"
:type="headerItem?.tableForm?.timeType || 'datetimerange'"
range-separator="至"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
end-placeholder="结束日期"
:format="headerItem?.tableForm?.format || 'YYYY-MM-DD HH:mm:ss'"
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'" />
:value-format="headerItem?.tableForm?.valueFormat || 'YYYY-MM-DDTHH:mm:ss'"
/>
</el-form-item>
<!-- Switch 开关 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Switch'"
:prop="headerItem.field">
<el-switch :key="headerItem.field+$index"
v-model="row[headerItem.field]"
<el-form-item v-if="headerItem?.tableForm?.type == 'Switch'" :prop="headerItem.field">
<el-switch
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:disabled="itemIsDisabled(headerItem, row)"
:loading="headerItem?.tableForm?.loading"
:loading="headerItem?.tableForm?.loading"
:size="headerItem?.tableForm?.size"
:active-icon="headerItem?.tableForm?.activeIcon"
:active-icon="headerItem?.tableForm?.activeIcon"
:inactive-icon="headerItem?.tableForm?.inactiveIcon"
:active-text="headerItem?.tableForm?.activeText"
:active-text="headerItem?.tableForm?.activeText"
:inactive-text="headerItem?.tableForm?.inactiveText"
:active-value="headerItem?.tableForm?.activeValue"
:active-value="headerItem?.tableForm?.activeValue"
:inactive-value="headerItem?.tableForm?.inactiveValue"
:active-color="headerItem?.tableForm?.inactiveColor"
:inactive-color="headerItem?.tableForm?.inactiveColor" />
:inactive-color="headerItem?.tableForm?.inactiveColor"
/>
</el-form-item>
<!-- Radio 单选-->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Radio'"
:prop="headerItem.field">
<el-radio-group :key="headerItem.field+$index"
v-model="row[headerItem.field]"
<el-form-item v-if="headerItem?.tableForm?.type == 'Radio'" :prop="headerItem.field">
<el-radio-group
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:size="headerItem?.tableForm?.size"
:disabled="itemIsDisabled(headerItem, row)"
:disabled="itemIsDisabled(headerItem, row)"
:text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill"
:name="headerItem?.tableForm?.name"
:id="headerItem?.tableForm?.id">
<el-radio
v-for="(item, index) in initSelectOptions(headerItem)"
:key="index"
:label="t(`ts.${item.value}`).replace('ts.','')"
:size="headerItem?.tableForm?.size"
:fill="headerItem?.tableForm?.fill"
:name="headerItem?.tableForm?.name"
:id="headerItem?.tableForm?.id"
>
<el-radio
v-for="(item, index) in initSelectOptions(headerItem)"
:key="index"
:label="t(`ts.${item.value}`).replace('ts.', '')"
:size="headerItem?.tableForm?.size"
:disabled="itemIsDisabled(headerItem, row)"
:border="headerItem?.tableForm?.border">
:border="headerItem?.tableForm?.border"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- Checkbox 多选-->
<el-form-item
v-if="headerItem?.tableForm?.type == 'Checkbox'"
:prop="headerItem.field">
<el-checkbox-group :key="headerItem.field+$index"
v-model="row[headerItem.field]"
<el-form-item v-if="headerItem?.tableForm?.type == 'Checkbox'" :prop="headerItem.field">
<el-checkbox-group
:key="headerItem.field + $index"
v-model="row[headerItem.field]"
:disabled="itemIsDisabled(headerItem, row)"
:size="headerItem?.tableForm?.size"
:min="headerItem?.tableForm?.min"
:size="headerItem?.tableForm?.size"
:min="headerItem?.tableForm?.min"
:max="headerItem?.tableForm?.max"
:text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill">
<el-checkbox
v-for="(item, index) in initSelectOptions(headerItem)"
:key="index"
:label="t(`ts.${item.value}`).replace('ts.','')"
:disabled="itemIsDisabled(headerItem, row)"
:true-label="t(`ts.${headerItem?.tableForm?.trueLabel}`).replace('ts.','')"
:false-label="t(`ts.${headerItem?.tableForm?.falseLabel}`).replace('ts.','')"
:text-color="headerItem?.tableForm?.textColor"
:fill="headerItem?.tableForm?.fill"
>
<el-checkbox
v-for="(item, index) in initSelectOptions(headerItem)"
:key="index"
:label="t(`ts.${item.value}`).replace('ts.', '')"
:disabled="itemIsDisabled(headerItem, row)"
:true-label="t(`ts.${headerItem?.tableForm?.trueLabel}`).replace('ts.', '')"
:false-label="t(`ts.${headerItem?.tableForm?.falseLabel}`).replace('ts.', '')"
:border="headerItem?.tableForm?.border"
:size="headerItem?.tableForm?.size"
:size="headerItem?.tableForm?.size"
:name="headerItem?.tableForm?.name"
:checked="headerItem?.tableForm?.checked">
:checked="headerItem?.tableForm?.checked"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<!-- table表添加操作列 -->
<!-- <el-form-item> -->
<div v-if="headerItem?.tableForm?.type == 'action'" :key="headerItem.field+$index">
<el-button
v-for="(itemButton, indexButton) in headerItem?.tableForm?.buttonText.split('|')"
:key="indexButton"
type="text"
style="padding-top: 0px;align-items:unsafe;"
@click="buttonOperationClick(row, headerItem?.tableForm?.buttonName.split('|')[indexButton], $index)"
>{{itemButton}}</el-button>
</div>
<div v-if="headerItem?.tableForm?.type == 'action'" :key="headerItem.field + $index">
<el-button
v-for="(itemButton, indexButton) in headerItem?.tableForm?.buttonText.split('|')"
:key="indexButton"
type="text"
style="padding-top: 0px; align-items: unsafe"
@click.stop="
buttonOperationClick(
row,
headerItem?.tableForm?.buttonName.split('|')[indexButton],
$index
)
"
>{{ itemButton }}</el-button
>
</div>
<!-- </el-form-item> -->
</el-form>
</el-table-column>
<!-- 删除按钮 -->
<el-table-column
fixed="right"
fixed="right"
:label="t('ts.操作')"
align="center"
:width="60"
v-if="isShowReduceButtonSelection"
:width="60"
v-if="isShowReduceButtonSelection"
v-slot="{ row, $index }"
>
<ButtonBase :Butttondata="[defaultButtons.mainListDeleteBtn(),]" @button-base-click="handleDeleteTable (row, $index)" />
<ButtonBase
:Butttondata="[defaultButtons.mainListDeleteBtn()]"
@button-base-click="handleDeleteTable(row, $index)"
/>
</el-table-column>
</el-table>
<!-- :page-sizes="[ 10,20, 30, 50, 100]" sizes-->
<el-pagination v-show="tableData.length>10" style="margin-top:10px"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:small="true"
:background="false"
layout="total, prev, pager, next, jumper"
:total="tableData.length"
/>
<div class="button flex" v-if="isShowButton||isShowReduceButtonSelection">
<div class="p-12px" v-if="isShowButton" @click="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer;" />
<div>{{t('ts.添加明细')}}</div>
<el-pagination
v-show="tableData.length > 10"
style="margin-top: 10px"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:small="true"
:background="false"
layout="total, prev, pager, next, jumper"
:total="tableData.length"
/>
<div class="button flex" v-if="isShowButton || isShowReduceButtonSelection">
<div class="p-12px" v-if="isShowButton" @click.stop="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer" />
<div>{{ t('ts.添加明细') }}</div>
</div>
<div class="p-12px" v-if="isShowReduceButtonSelection" @click="handleSelectionDelete">
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer;" />
<div>{{t('ts.批量删除')}}</div>
<div class="p-12px" v-if="isShowReduceButtonSelection" @click.stop="handleSelectionDelete">
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer" />
<div>{{ t('ts.批量删除') }}</div>
</div>
<div class="p-12px" v-if="routeName == 'PurchaseMain'||routeName == 'ProductionMain'||routeName == 'ZZBJDeliverPlanMain'||routeName == 'DeliverPlanMain'||routeName == 'DeliverRequestMain'||routeName == 'ZZBJDeliverRequestMain'||routeName == 'UnplannedreceiptRequestMain'">
<el-input v-model="keyWord" style="width: 240px" placeholder="回车自动添加"/>
<el-button type="primary" style="margin-left: 10px" @click="batchAdd">{{t('批量添加')}}</el-button>
<div
class="p-12px"
v-if="
routeName == 'PurchaseMain' ||
routeName == 'ProductionMain' ||
routeName == 'ZZBJDeliverPlanMain' ||
routeName == 'DeliverPlanMain' ||
routeName == 'DeliverRequestMain' ||
routeName == 'ZZBJDeliverRequestMain' ||
routeName == 'UnplannedreceiptRequestMain'
"
>
<el-input v-model="keyWord" style="width: 240px" placeholder="回车自动添加" />
<el-button type="primary" style="margin-left: 10px" @click.stop="batchAdd">{{
t('批量添加')
}}</el-button>
</div>
</div>
</div>
@ -349,46 +428,46 @@ const props = defineProps({
//
isShowButton: {
type: Boolean,
default: true,
default: true
},
// :custom="headerItem.sortable?headerItem.sortable:false"
selectionTable: {
type: Boolean,
default: false,
default: false
},
//
isShowIndex: {
type: Boolean,
default: false,
default: false
},
// --
isShowReduceButtonSelection:{
isShowReduceButtonSelection: {
type: Boolean,
default: false,
default: false
},
//
isShowReduceButton:{
isShowReduceButton: {
type: Boolean,
default: true,
default: true
},
//
tableLoading: {
type: Boolean,
default: false,
default: false
},
//
tableData: {
type: Array,
default: () => {
return []
},
}
},
//
tableFields: {
type: Array,
default: () => {
return []
},
}
},
// table
height: {
@ -396,7 +475,7 @@ const props = defineProps({
default: () => {
return '200'
}
},
},
maxHeight: {
type: [Number, String],
default: () => {
@ -406,7 +485,7 @@ const props = defineProps({
//
border: {
type: Boolean,
default: false,
default: false
},
// tablerules
tableFormRules: {
@ -418,7 +497,7 @@ const props = defineProps({
type: String,
required: false,
default: ''
},
}
})
//
const emit = defineEmits([
@ -444,16 +523,16 @@ const initSelectOptions = (item) => {
return item.dictType ? getStrDictOptions(item.dictType) : item.tableForm.initOptions
}
//
const formSelectChange = (field, val,row) => {
emit('formSelectChange', field, val,row)
const formSelectChange = (field, val, row) => {
emit('formSelectChange', field, val, row)
}
//
const formFormDateChange = (field, val,row, index) => {
emit('formFormDateChange', field, val,row, index)
const formFormDateChange = (field, val, row, index) => {
emit('formFormDateChange', field, val, row, index)
}
//
const tableFormSelectOnBlur = (field, val,row,index) => {
emit('tableFormSelectOnBlur', field, val,row,index)
const tableFormSelectOnBlur = (field, val, row, index) => {
emit('tableFormSelectOnBlur', field, val, row, index)
}
// -
const inputNumberChange = (field, index, row, e) => {
@ -465,18 +544,18 @@ const deleteTableData = ref([])
// selection
const tableSelectionChange = (val) => {
if(props.isShowReduceButtonSelection){
//
if (props.isShowReduceButtonSelection) {
//
deleteTableData.value = val
}else{
} else {
emit('tableSelectionChange', val)
}
}
const handleSelectionDelete = ()=>{
const handleSelectionDelete = () => {
emit('tableSelectionDelete', deleteTableData.value)
nextTick(()=>{
deleteTableData.value.forEach(row=>{
TableBaseComponents_Ref.value!.toggleRowSelection(row,false)
nextTick(() => {
deleteTableData.value.forEach((row) => {
TableBaseComponents_Ref.value!.toggleRowSelection(row, false)
})
})
}
@ -491,12 +570,25 @@ const tableSortChange = (column, prop, order) => {
//
const handleTableSelect = (row, column, event) => {
const selected = TableBaseComponents_Ref.value
?.getSelectionRows()
.some((item) => item.id === row.id)
if (!selected) {
TableBaseComponents_Ref.value?.toggleRowSelection(row, true)
} else {
//
TableBaseComponents_Ref.value?.toggleRowSelection(row, false)
}
emit('handleTableSelect', row, column, event)
}
// item
const itemIsDisabled = (colum, row) => {
return Boolean(colum.tableForm?.disabled) || Boolean(row.disabled) || Boolean(row['disabled_' + colum.field])
return (
Boolean(colum.tableForm?.disabled) ||
Boolean(row.disabled) ||
Boolean(row['disabled_' + colum.field])
)
}
// const { t } = useI18n() //
@ -506,25 +598,27 @@ const TableBaseComponents_Ref = ref()
const TableBaseForm_Ref = ref()
/**
* 验证表单是否符合rules
* @param {*} success 如果验证成功走的方法
* @param {*} error 如果验证不成功走的方法
*/
* 验证表单是否符合rules
* @param {*} success 如果验证成功走的方法
* @param {*} error 如果验证不成功走的方法
*/
const validateForm = () => {
console.log(TableBaseForm_Ref.value)
let _lists = TableBaseForm_Ref.value?.map(v => v.validate())
return Promise.all(_lists).then(() => {
return true
}).catch(() => {
return false
})
let _lists = TableBaseForm_Ref.value?.map((v) => v.validate())
return Promise.all(_lists)
.then(() => {
return true
})
.catch(() => {
return false
})
}
//
const handleDeleteTable = (row, index) => {
emit('handleDeleteTable', row, index)
nextTick(()=>{
TableBaseComponents_Ref.value!.toggleRowSelection(row,false)
nextTick(() => {
TableBaseComponents_Ref.value!.toggleRowSelection(row, false)
})
}
//
@ -532,59 +626,67 @@ const handleAddTable = () => {
emit('handleAddTable')
}
//
const inpuFocus = (headerItem, row, index)=>{
if(headerItem?.tableForm?.isInpuFocusShow){
emit('inpuFocus', headerItem, row, index)
const inpuFocus = (headerItem, row, index) => {
if (headerItem?.tableForm?.isInpuFocusShow) {
emit('inpuFocus', headerItem, row, index)
}
}
// input
const inputStringBlur = (headerItem, val,row,index) => {
emit('inputStringBlur', headerItem, val,row,index)
const inputStringBlur = (headerItem, val, row, index) => {
emit('inputStringBlur', headerItem, val, row, index)
}
const clearInput= (field, row, index) => {
emit('clearInput',field, row, index)
const clearInput = (field, row, index) => {
emit('clearInput', field, row, index)
}
//table
const buttonOperationClick = (row, label, index)=> {
emit("buttonOperationClick", row, label, index);
const buttonOperationClick = (row, label, index) => {
emit('buttonOperationClick', row, label, index)
}
const currentPage =ref(1)
const currentPage = ref(1)
const pageSize = ref(10)
const showTableData = ()=>{
if(props.tableData.length>10){
return props.tableData.slice((currentPage.value-1)*pageSize.value,currentPage.value*pageSize.value)
}else{
const showTableData = () => {
if (props.tableData.length > 10) {
return props.tableData.slice(
(currentPage.value - 1) * pageSize.value,
currentPage.value * pageSize.value
)
} else {
return props.tableData
}
}
const keyWord = ref('')
console.log(9999,props.tableFields)
const batchAdd = ()=>{
console.log(9999, props.tableFields)
const batchAdd = () => {
console.log(keyWord.value)
let field = ''
const itemCodeFields = props.tableFields.find(item=>item.field == 'itemCode')
const supplierFields = props.tableFields.find(item=>item.field == 'supplierCode')
if(itemCodeFields){
const itemCodeFields = props.tableFields.find((item) => item.field == 'itemCode')
const supplierFields = props.tableFields.find((item) => item.field == 'supplierCode')
if (itemCodeFields) {
field = itemCodeFields.field
}else {
if(itemCodeFields){
} else {
if (itemCodeFields) {
field = supplierFields.field
}
}
console.log(field)
emit('batchAdd',keyWord.value)
console.log(field)
emit('batchAdd', keyWord.value)
}
const disabledInput=(headerItem,row)=>{
if(headerItem.tableForm?.isInpuFocusShow){
if(headerItem.tableForm?.enterSearch){
const disabledInput = (headerItem, row) => {
if (headerItem.tableForm?.isInpuFocusShow) {
if (headerItem.tableForm?.enterSearch) {
return false
}else{
} else {
return true
}
}else{
return headerItem?.tableForm?.disabled || Boolean(row.disabled) || Boolean(row['disabled_' + headerItem.field]) ||false
} else {
return (
headerItem?.tableForm?.disabled ||
Boolean(row.disabled) ||
Boolean(row['disabled_' + headerItem.field]) ||
false
)
}
}
@ -594,13 +696,12 @@ defineExpose({
validateForm,
keyWord
})
</script>
<style scoped lang="scss">
::v-deep(.el-table__body){
padding:10px 0px
::v-deep(.el-table__body) {
padding: 10px 0px;
}
::v-deep(.el-table--default .el-table__cell) {
padding: 2px 0px;
@ -623,20 +724,23 @@ defineExpose({
display: block;
}
.table-form ::v-deep(.is-horizontal) {
height: 12px !important;
display: block !important;
}
.button {
>div {
> div {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
>div {
> div {
margin-left: 6px;
text-decoration: underline;
color: #409eff;
}
}
}
</style>

2
src/components/XButton/src/ButtonBase.vue

@ -8,7 +8,7 @@
:disabled="item.disabled"
v-hasPermi="[item.hasPermi] || []"
v-if="item.name != 'set'"
@click="buttonBaseClick(item.name, item, $event)"
@click.stop="buttonBaseClick(item.name, item, $event)"
>
<Icon v-if="item.icon" :icon="item.icon" class="mr-1px" />
<span :style="{width:item.width+'px'||'auto'}" :class="[item.width?'ellipsis':'']">{{ item.label }}</span>

4
src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 到货验货任务拆分策略弹出层 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<!-- 规则 -->
<el-form
ref="formRef"

4
src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 批次策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 800px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 下架策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue

@ -1,8 +1,8 @@
<!-- 检验策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 800px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px" >
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 管理精度策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue

@ -1,8 +1,8 @@
<!-- 采购收货任务拆分策略弹出层 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<!-- 规则 -->
<el-form
ref="formRef"

4
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 补料策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 存储容量策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue

@ -1,8 +1,8 @@
<!-- 采购计划策略弹出层 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 800px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 上架策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 器具容量策略弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue

@ -1,7 +1,7 @@
<!-- 库位存储策略弹窗弹窗 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 700px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<Dialog :title="dialogTitle" v-model="dialogVisible" width="700px">
<div class="p-20px m--10px" style="max-height: 80vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"

4
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -127,7 +127,7 @@
:isShowFooterButtton="false"
/>
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<SearchTable width="905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
@ -459,7 +459,7 @@ const labelPrint = async (row) => {
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
item.width = item.table?.width
})
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}

4
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -154,7 +154,7 @@
</BasicForm>
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" >
<SearchTable width="905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" >
<!-- <template #actions>
<el-button type="primary" @click="printAllClick">打印全部</el-button>
</template> -->
@ -894,7 +894,7 @@ const labelPrint = async (row) => {
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
item.width = item.table?.width
})
searchTableRef.value.openData(t('ts.标签信息'),tableObjectPrint,{tableColumns},true)
}

5
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -1694,7 +1694,6 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
sort: 'custom',
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
},
@ -1704,7 +1703,6 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
@ -1713,7 +1711,6 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
@ -1721,7 +1718,6 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
@ -1734,7 +1730,6 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
component: 'SelectV2'
},
table: {
width: 150,
},
},

Loading…
Cancel
Save