给相关单据的扩展字段进行优化

This commit is contained in:
jishenghua
2025-03-27 22:22:02 +08:00
parent b39fd7840a
commit aecd647223
8 changed files with 93 additions and 46 deletions

View File

@@ -3,7 +3,7 @@
* 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
*/
import { filterObj,getNowFormatStr } from '@/utils/util';
import { filterObj, getMpListShort, getNowFormatStr } from '@/utils/util'
import { deleteAction, getAction, postAction, downFile, downFilePost, getFileAccessHttpUrl } from '@/api/manage'
import Vue from 'vue'
import VueDraggableResizable from 'vue-draggable-resizable'
@@ -539,6 +539,31 @@ export const JeecgListMixin = {
this.ipagination.total = this.ipagination.total + size
}
},
//动态替换扩展字段
handleChangeOtherField(showQuery) {
let mpStr = getMpListShort(Vue.ls.get('materialPropertyList'))
if(mpStr) {
let mpArr = mpStr.split(',')
if(mpArr.length ===3) {
if(showQuery) {
this.queryTitle.mp1 = mpArr[0]
this.queryTitle.mp2 = mpArr[1]
this.queryTitle.mp3 = mpArr[2]
}
for (let i = 0; i < this.defColumns.length; i++) {
if(this.defColumns[i].dataIndex === 'otherField1') {
this.defColumns[i].title = mpArr[0]
}
if(this.defColumns[i].dataIndex === 'otherField2') {
this.defColumns[i].title = mpArr[1]
}
if(this.defColumns[i].dataIndex === 'otherField3') {
this.defColumns[i].title = mpArr[2]
}
}
}
}
},
paginationChange(page, pageSize) {
this.ipagination.current = page
this.ipagination.pageSize = pageSize