Browse Source

明细添加字段设置功能

noToken
安虹睿 1 year ago
parent
commit
1782117bef
  1. 12
      PC/InterFace.Dash/src/components/filterForDetailPage/index.vue
  2. 12
      PC/InterFace.Dash/src/components/tablePagination/index.vue
  3. 3
      PC/InterFace.Dash/src/mixins/TableHeaderMixins.js
  4. 10
      PC/InterFace.Dash/src/mixins/TableMixins.js
  5. 34
      PC/InterFace.Dash/src/utils/detailsPageColumns_api/index.js
  6. 12
      PC/InterFace.Dash/src/views/interfaceBoard/AsnMstr.vue

12
PC/InterFace.Dash/src/components/filterForDetailPage/index.vue

@ -20,6 +20,8 @@
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
@rowDrop="rowDropForDetail"
:rowSource="'detailPage_api'"
:tableColumns="listColumns"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
@ -46,7 +48,7 @@
label="操作"
:align="'center'"
width="150"
fixed="right"
fixed="left"
>
<template slot-scope="scope">
<span v-for="item in operaButtons" style="margin: 0 10px;">
@ -181,7 +183,9 @@ props: {
showHandleButtons:{
type:Array,
default:() => {
return ['showParent','fresh','filter'];//'add','edit' 'delete'
//'add','edit' 'delete'
// showParentfreshfilterfield
return ['showParent','fresh','filter','field'];
}
},
// 2
@ -215,6 +219,9 @@ mounted(){
this.initHandleButtons()
},
methods: {
rowDropForDetail(data,type){
this.$emit("rowDropForDetail", data,type)
},
//
initHandleButtons(){
//
@ -222,6 +229,7 @@ methods: {
if(this.showHandleButtons.indexOf('add') >= 0){_arr_header.push(this.defaultAddBtn())}
if(this.showHandleButtons.indexOf('fresh') >= 0){_arr_header.push(this.defaultFreshBtn())}
if(this.showHandleButtons.indexOf('filter') >= 0){_arr_header.push(this.defaultFilterBtn())}
if(this.showHandleButtons.indexOf('field') >= 0){_arr_header.push(this.defaultFieldSettingBtn())}
this.currenButtonData = _arr_header
//

12
PC/InterFace.Dash/src/components/tablePagination/index.vue

@ -34,6 +34,7 @@
:tableColumns="tableColumns"
:visible="rowDropVisible"
@closeRowDrop="closeRowDrop"
:source="rowSource"
></rowDrop>
<!-- 列表 -->
<div class="uTableOuter" ref="uTableOuterRef" :style="{height:uTableOuterHeight + 'px',overflow:'hidden'}">
@ -194,6 +195,11 @@ export default {
default: () => {
return Function;
}
},
// -
rowSource:{
type:String,
default:'list_api'
}
},
data () {
@ -257,9 +263,11 @@ export default {
})
},
methods: {
rowDrop(data) {
this.$emit('rowDrop',data)
rowDrop(data,type) {
this.$emit('rowDrop',data,type)
this.$nextTick(()=>{
this.isUpdate = !this.isUpdate
})
},
//
topbutton (val,item) {

3
PC/InterFace.Dash/src/mixins/TableHeaderMixins.js

@ -301,12 +301,13 @@ export const TableHeaderMixins = {
* 表头字段设置
* @param {*} data 数据
* @param {*} type 设置来源
* list_api: 表头来自api的列表 detail_api: 表头来自api列表的明细
* list_api: 表头来自api的列表 detail_api: 表头来自api列表的明细 detailPage_api表头来自api的明细页面列表
* list: 表头固定的列表 detail: 表头固定列表的明细
*/
rowDrop(data,type) {
if(!type || type == 'list_api'){ this.apiColumns_Table = data }
if(type && type == 'detail_api'){ this.apiColumns_DetailsTable = data }
if(type && type == 'detailPage_api'){ this.apiColumns_DetailsPage = data }
if(type && type == 'list'){ this.tableColumns = data }
if(type && type == 'detail'){ this.detailsTableColumns = data }
}

10
PC/InterFace.Dash/src/mixins/TableMixins.js

@ -42,6 +42,7 @@ export const tableMixins = {
apiColumns_Table:null,
apiColumns_DesTions:null,
apiColumns_DetailsTable:null,
apiColumns_DetailsPage:null,
//主表-列表
URLOption_base:allUrlOption[this.$route.name].baseURL,
//主表-明细
@ -54,11 +55,12 @@ export const tableMixins = {
},
methods: {
// 获取通过api的表头数据,不可以在初始化处理,因为接口返回问题
initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api){
initApiColumns(table,des,detailsTable,detailsPage){
// 赋值表头数据
this.apiColumns_Table = this.initTableColumns(tableColumns_api[this.$route.name])
this.apiColumns_DesTions = tabsDesTions_api[this.$route.name]
this.apiColumns_DetailsTable = this.initTableColumns(detailsTableColumns_api[this.$route.name],'detail_api')
this.apiColumns_Table = this.initTableColumns(table[this.$route.name])
this.apiColumns_DesTions = des[this.$route.name]
this.apiColumns_DetailsTable = this.initTableColumns(detailsTable[this.$route.name],'detail_api')
this.apiColumns_DetailsPage = this.initTableColumns(detailsPage[this.$route.name],'detailPage_api')
},
//渲染数据
paging(callback) {

34
PC/InterFace.Dash/src/utils/detailsPageColumns_api/index.js

@ -0,0 +1,34 @@
// 此文件为【列表 - 明细】+【明细 - 列表】表头从接口缓存的表头
import { initFromApiColumnsLable } from '@/utils/index'
// AsnMstr
export const AsnMstr = [
{ label: initFromApiColumnsLable('AsnDetAsnMstrId'), prop: "asnMstrId"},
{ label: initFromApiColumnsLable('AsnDetAsnNbr'), prop: "asnNbr" },
{ label: initFromApiColumnsLable('AsnDetEntireBarCode'), prop: "creationTime",type:'dateTime' },
{ label: initFromApiColumnsLable('AsnDetLabelCode'), prop: "labelCode" },
{ label: initFromApiColumnsLable('AsnDetLocUm'), prop: "locUm" },
{ label: initFromApiColumnsLable('AsnDetLot'), prop: "lot" },
{ label: initFromApiColumnsLable('AsnDetPalletLabelCode'), prop: "palletLabelCode" },
{ label: initFromApiColumnsLable('AsnDetPartCode'), prop: "partCode" },
{ label: initFromApiColumnsLable('AsnDetPartType'), prop: "partType" },
{ label: initFromApiColumnsLable('AsnDetPoLine'), prop: "poLine" },
{ label: initFromApiColumnsLable('AsnDetPoNbr'), prop: "poNbr" },
{ label: initFromApiColumnsLable('AsnDetPoUm'), prop: "poUm" },
{ label: initFromApiColumnsLable('AsnDetProductionDate'), prop: "productionDate" },
{ label: initFromApiColumnsLable('AsnDetQty'), prop: "qty" },
{ label: initFromApiColumnsLable('AsnDetRemark'), prop: "remark" },
{ label: initFromApiColumnsLable('AsnDetStatus'), prop: "status" },
{ label: initFromApiColumnsLable('AsnDetStdPackQty'), prop: "stdPackQty" },
{ label: initFromApiColumnsLable('AsnDetSupplierlot'), prop: "supplierlot" },
{ label: initFromApiColumnsLable('AsnDetUmConv'), prop: "umConv" },
{ label: initFromApiColumnsLable('AsnDetWareClass'), prop: "wareClass" },
{ label: initFromApiColumnsLable('AsnDetWareCode'), prop: "wareCode" },
]
// 测试数据
export const TestSchool = [
{ label: initFromApiColumnsLable('TestStudentDetailStudentName'), prop: "studentName" },
{ label: initFromApiColumnsLable('TestStudentDetailOrderType'), prop: "orderType" },
]

12
PC/InterFace.Dash/src/views/interfaceBoard/AsnMstr.vue

@ -49,8 +49,9 @@
></curren-Drawer>
<!-- 明细查询页面 -->
<filterForDetailPage
v-if="filterForDetailShow"
:listColumns="apiColumns_DetailsTable"
@rowDropForDetail="rowDrop"
v-if="filterForDetailShow && apiColumns_DetailsPage"
:listColumns="apiColumns_DetailsPage"
:parentColumns="apiColumns_Table"
@closeDialog="changeFilterForDetailShow"
></filterForDetailPage>
@ -72,7 +73,8 @@ import { filterSelectMixins } from '@/mixins/filter-Select'
import { getToken } from '@/utils/auth'
import * as tableColumns_api from "@/utils/tableColumns_api/index" //
import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //
import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //
import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //-
import * as detailsPageColumns_api from "@/utils/detailsPageColumns_api/index" //
export default {
@ -98,12 +100,10 @@ export default {
this.defaultFilterBtn(),//
this.defaultFilterForDetailBtn()//
],
//
filterForDetailShow:false,
};
},
mounted() {
this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api)
this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api,detailsPageColumns_api)
this.paging();
},
}

Loading…
Cancel
Save