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

Loading…
Cancel
Save