Browse Source

详情组件修改

master
陈薪名 1 year ago
parent
commit
873823f7e5
  1. 25
      src/components/Detail/src/Detail.vue

25
src/components/Detail/src/Detail.vue

@ -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' }), //
]
}
// -

Loading…
Cancel
Save