优化单据的宽度屏幕自适应

This commit is contained in:
季圣华
2022-06-08 00:11:18 +08:00
parent ab715fa84f
commit d791191adb
11 changed files with 22 additions and 21 deletions

View File

@@ -818,11 +818,6 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
// 页面是否在加载中
minWidth: {
type: Number,
default: 1550
},
maxHeight: { maxHeight: {
type: Number, type: Number,
default: 400 default: 400
@@ -919,6 +914,7 @@
statisticsColumns: {}, statisticsColumns: {},
// 只有在行编辑被销毁时才主动清空GroupRequest的内存 // 只有在行编辑被销毁时才主动清空GroupRequest的内存
destroyCleanGroupRequest: false, destroyCleanGroupRequest: false,
minWidth: 1500,
} }
}, },
created() { created() {
@@ -926,6 +922,8 @@
// 当前显示的tr // 当前显示的tr
this.visibleTrEls = [] this.visibleTrEls = []
this.disabledRowIds = (this.disabledRowIds || []) this.disabledRowIds = (this.disabledRowIds || [])
let realScreenWidth = window.screen.width * window.devicePixelRatio
this.minWidth = realScreenWidth<1500?1250:1500
}, },
// 计算属性 // 计算属性
computed: { computed: {

View File

@@ -1000,7 +1000,7 @@
purchaseBySaleFlag: false, purchaseBySaleFlag: false,
financialBillNoList: [], financialBillNoList: [],
tableWidth: { tableWidth: {
'width': '1550px' 'width': '1500px'
}, },
tableWidthRetail: { tableWidthRetail: {
'width': '1150px' 'width': '1150px'
@@ -1298,7 +1298,10 @@
}, },
created () { created () {
let realScreenWidth = window.screen.width * window.devicePixelRatio let realScreenWidth = window.screen.width * window.devicePixelRatio
this.width = realScreenWidth<1600?'1300px':'1600px' this.width = realScreenWidth<1500?'1300px':'1550px'
this.tableWidth = {
'width': realScreenWidth<1500?'1250px':'1500px'
}
}, },
methods: { methods: {
initSetting(record, type, ds) { initSetting(record, type, ds) {

View File

@@ -54,7 +54,7 @@ export const BillModalMixin = {
let userInfo = Vue.ls.get(USER_INFO) let userInfo = Vue.ls.get(USER_INFO)
this.isTenant = userInfo.id === userInfo.tenantId? true:false this.isTenant = userInfo.id === userInfo.tenantId? true:false
let realScreenWidth = window.screen.width * window.devicePixelRatio let realScreenWidth = window.screen.width * window.devicePixelRatio
this.width = realScreenWidth<1600?'1300px':'1600px' this.width = realScreenWidth<1500?'1300px':'1550px'
}, },
computed: { computed: {
readOnly: function() { readOnly: function() {

View File

@@ -252,7 +252,7 @@
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
{ title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'}, { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true }, { title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
{ title: '价税合计', key: 'taxLastMoney', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input } { title: '备注', key: 'remark', width: '5%', type: FormTypes.input }
] ]
}, },

View File

@@ -281,9 +281,9 @@
}, },
{ title: '单价', key: 'unitPrice', width: '4%', type: FormTypes.inputNumber}, { title: '单价', key: 'unitPrice', width: '4%', type: FormTypes.inputNumber},
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
{ title: '税率', key: 'taxRate', width: '3%', type: FormTypes.inputNumber,placeholder: '%'}, { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true }, { title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
{ title: '价税合计', key: 'taxLastMoney', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input }, { title: '备注', key: 'remark', width: '5%', type: FormTypes.input },
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden }, { title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
] ]

View File

@@ -246,9 +246,9 @@
}, },
{ title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber }, { title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber },
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
{ title: '税率', key: 'taxRate', width: '3%', type: FormTypes.inputNumber,placeholder: '%'}, { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true }, { title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
{ title: '价税合计', key: 'taxLastMoney', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input}, { title: '备注', key: 'remark', width: '5%', type: FormTypes.input},
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden }, { title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
] ]

View File

@@ -257,9 +257,9 @@
}, },
{ title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber}, { title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber},
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
{ title: '税率', key: 'taxRate', width: '3%', type: FormTypes.inputNumber,placeholder: '%'}, { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true }, { title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
{ title: '价税合计', key: 'taxLastMoney', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input } { title: '备注', key: 'remark', width: '5%', type: FormTypes.input }
] ]
}, },

View File

@@ -237,9 +237,9 @@
}, },
{ title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber}, { title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber},
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
{ title: '税率', key: 'taxRate', width: '3%', type: FormTypes.inputNumber,placeholder: '%'}, { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true }, { title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
{ title: '价税合计', key: 'taxLastMoney', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input } { title: '备注', key: 'remark', width: '5%', type: FormTypes.input }
] ]
}, },

View File

@@ -295,9 +295,9 @@
}, },
{ title: '单价', key: 'unitPrice', width: '4%', type: FormTypes.inputNumber}, { title: '单价', key: 'unitPrice', width: '4%', type: FormTypes.inputNumber},
{ title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
{ title: '税率', key: 'taxRate', width: '3%', type: FormTypes.inputNumber,placeholder: '%'}, { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber,placeholder: '%'},
{ title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true }, { title: '税额', key: 'taxMoney', width: '5%', type: FormTypes.inputNumber, readonly: true, statistics: true },
{ title: '价税合计', key: 'taxLastMoney', width: '5%', type: FormTypes.inputNumber, statistics: true }, { title: '价税合计', key: 'taxLastMoney', width: '6%', type: FormTypes.inputNumber, statistics: true },
{ title: '备注', key: 'remark', width: '5%', type: FormTypes.input }, { title: '备注', key: 'remark', width: '5%', type: FormTypes.input },
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden }, { title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
] ]

View File

@@ -468,7 +468,7 @@
}, },
created () { created () {
let realScreenWidth = window.screen.width * window.devicePixelRatio let realScreenWidth = window.screen.width * window.devicePixelRatio
this.width = realScreenWidth<1600?'1300px':'1600px' this.width = realScreenWidth<1500?'1300px':'1550px'
}, },
methods: { methods: {
show(record, type) { show(record, type) {

View File

@@ -37,7 +37,7 @@ export const FinancialModalMixin = {
let userInfo = Vue.ls.get(USER_INFO) let userInfo = Vue.ls.get(USER_INFO)
this.isTenant = userInfo.id === userInfo.tenantId? true:false this.isTenant = userInfo.id === userInfo.tenantId? true:false
let realScreenWidth = window.screen.width * window.devicePixelRatio let realScreenWidth = window.screen.width * window.devicePixelRatio
this.width = realScreenWidth<1600?'1300px':'1600px' this.width = realScreenWidth<1500?'1300px':'1550px'
}, },
computed: { computed: {
readOnly: function() { readOnly: function() {