|
|
@ -22,7 +22,6 @@ |
|
|
|
:masterId="masterParmas.masterId" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
/> |
|
|
|
<Descriptions v-if="isBasic" :data="detailData" :schema="allSchemas.detailSchema" :columns="2" /> |
|
|
@ -86,7 +85,6 @@ const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
routeName.value = routeName.value.substring(0,routeName.value.length - 4) + 'Detail' |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
// 标签参数 |
|
|
|
tabs: { |
|
|
@ -215,11 +213,13 @@ const change = (item, index) => { |
|
|
|
current.value = index |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//主表所需的参数 |
|
|
|
const masterParmas=ref({ |
|
|
|
masterId:'',//主表id |
|
|
|
number: '',//主表单据号 |
|
|
|
})//主表所需的参数 |
|
|
|
status: '',//主表状态 用于控制子表新增编辑按钮显示情况 |
|
|
|
}) |
|
|
|
|
|
|
|
/** 打开弹窗 */ |
|
|
|
const titleNameRef = ref() |
|
|
|
const titleValueRef = ref() |
|
|
@ -235,6 +235,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
// 设置主表id |
|
|
|
masterParmas.value.masterId = row.id |
|
|
|
masterParmas.value.number = row.number |
|
|
|
masterParmas.value.status = row.status |
|
|
|
tableObject.params = { |
|
|
|
masterId: row.id, |
|
|
|
} |
|
|
@ -282,10 +283,10 @@ const { tableObject, tableMethods } = useTable({ |
|
|
|
// 获得表格的各种操作 |
|
|
|
const { getList } = tableMethods |
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
|
const HeadButttondata = ref([ |
|
|
|
defaultButtons.defaultAddBtn({ hide: masterParmas.value.status=='REQUEST_NEW'?false:true}), // 新增 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
] |
|
|
|
]) |
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { // 新增 |
|
|
@ -303,14 +304,14 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
|
} |
|
|
|
// const updataTableColumns = (val) => { |
|
|
|
// detailAllSchemas.tableColumns.value = val |
|
|
|
// } |
|
|
|
// 列表-操作按钮 |
|
|
|
const buttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListEditBtn({ hide: false, hasPermi: 'wms:purchaseclaim-request-main:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ hide: false, hasPermi: 'wms:purchaseclaim-request-main:delete' }), // 删除 |
|
|
|
defaultButtons.mainListEditBtn({ hide: masterParmas.value.status=='REQUEST_NEW'?false:true, hasPermi: 'wms:purchaseclaim-request-main:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ hide: masterParmas.value.status=='REQUEST_NEW'?false:true, hasPermi: 'wms:purchaseclaim-request-main:delete' }), // 删除 |
|
|
|
] |
|
|
|
} |
|
|
|
// 列表-操作按钮事件 |
|
|
|