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