You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
5.8 KiB

4 months ago
## dev发布2024-06-01-002
9 months ago
**xxxx.data.ts 文件配置说明**
4 weeks ago
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
dictAllOption:true,// true 字典中--下拉框中展示全选按钮
dictAllValue:'全选', // 全选按钮的value值
9 months ago
**form表单查询弹窗配置**
form: {
labelMessage: '信息提示说明!!!',
componentProps: {
value:'undefined',//默认值,设置为'undefined'-->实际是undefined(解决SelectV2不显示占位符placeholder)
enterSearch: true, //可输入回车 对应绑定事件:@onEnter="onEnter"
9 months ago
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
9 months ago
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题
hiddenFilterButton:true,//是否隐藏筛选按钮
4 months ago
dialogWidth:'100px',//搜索出来弹窗的宽度
isConcatDetailSchemas:true, // 是否主子表合并
searchDetailSchemas: PurchasereceiptRecordDetail.allSchemas, // 查询弹窗所需子表类
9 months ago
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productionLineCode', // 查询列表中字段
value:'prodLine', // 指主表某字段
message: '请选择生产线信息!', // 当前置条件为空时 弹出信息提示
9 months ago
isMainValue: true // 表示查询条件是主表的字段的值
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
2 months ago
isFilterValue:true // 字段拼到filters里,和isMainValue配合使用
2 months ago
action: '==', // 查询拼接条件
9 months ago
},
{
key: 'customerCode', // 查询列表中字段
value: 'customerCode', // 指查询具体值
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
message: '请选择客户代码!', // 前置添加没填的提示语
4 months ago
},
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isTableRowValue: true, //查询当前searchTable表中行数据的值
isMainValue:false
},
9 months ago
{
key:'available', // 查询列表中字段
value:'TRUE', // 指查询具体值
isMainValue: false // 表示查询条件不是主表的字段的值
}
],
verificationPage: ItembasicApi.getItemListByCodes, // tableForm下方输入框校验失去焦点之后是否正确的方法
isShowTableFormSearch: true, //tableForm下方是否出现输入框
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
// 失去焦点校验参数
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true,
}]
9 months ago
}
}
**tableForm明细列表查询弹窗配置**
tableForm:{
hidden:false,//控制列是否展示
9 months ago
isInpuFocusShow: true, // 开启查询弹窗 【**与form表单中唯一不同属性**】
searchListPlaceholder: '请选择从仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库基础信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available', // 查询列表中字段
value: 'TRUE', // 指查询具体值
isMainValue: false // 表示查询条件不是主表的字段的值
},
{
key: 'available', // 查询列表中字段
value: 'TRUE', // 指查询具体值
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
9 months ago
}]
},
**主子表合并需要修改的代码**
1、影响Table表头
const tableColumns =
ref([…”PurchaseMain”.allSchemas.tableColumns,…”PurchaseDetail”.allSchemas.tableMainColumns])
PurchaseMain:主表
PurchaseDetail:子表
2、影响搜索头部
在TableHead标签内部添加属性:
<TableHead
......
:detailAllSchemas="PurchaseDetail.allSchemas"
/>
3、影响操作按钮
3.1 修改<Table 标签中赋值
原有:
#action="{ row }”
:Butttondata=“butttondata(row)"
改为:
#action="{ row,$index }”
:Butttondata="butttondata(row,$index)"
3.2 在按钮回调中添加$index,固定的写死:
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
…下面是原有的按钮逻辑,不变
}
4、更换子表的请求接口
const { tableObject, tableMethods } = useTable({
getListApi: “PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage”// 分页接口
})
5、搜索工作栏
<Search
:schema="[...CountPlanMain.allSchemas.searchSchema,...CountPlanDetail.allSchemas.searchSchema]"
@search="setSearchParams"
@reset="setSearchParams"
/>
6、ts文件配置:
hiddenInMain:true, //子表中数据不展示在主表
sortTableDefault:1000, // 主页面中Table表中展示的排序位置:默认值999 ,最小值1,值越大越靠后,值越小越靠前
sortSearchDefault:1000,// 搜素框中展示的排序位置,用法同sortTableDefault