projects/mesxc-zhp #274

Merged
juzi merged 2 commits from projects/mesxc-zhp into projects/mesxc-test 2024-03-26 09:46:08 +08:00
6 changed files with 35 additions and 10 deletions
Showing only changes of commit 774d51fdcf - Show all commits

View File

@ -12,6 +12,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData"></base-table> :table-data="tableData"></base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -69,6 +70,7 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -109,6 +111,9 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
getEnergyTypeListAll().then((response) => { getEnergyTypeListAll().then((response) => {
this.formConfig[0].selectOptions = response.data; this.formConfig[0].selectOptions = response.data;
}); });
@ -133,7 +138,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 20;
this.listQuery.energyTypeId = val.energyTypeId; this.listQuery.energyTypeId = val.energyTypeId;
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime

View File

@ -12,6 +12,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData"></base-table> :table-data="tableData"></base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -79,6 +80,7 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -133,6 +135,9 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
@ -150,7 +155,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 20;
this.listQuery.reportType = val.reportType; this.listQuery.reportType = val.reportType;
this.listQuery.energyTypeId = val.energyTypeId; this.listQuery.energyTypeId = val.energyTypeId;
this.listQuery.reportTime = val.searchTime this.listQuery.reportTime = val.searchTime

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-08-24 11:19:43 * @Date: 2022-08-24 11:19:43
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-12-07 09:35:33 * @LastEditTime: 2024-03-25 14:11:46
* @Description: * @Description:
*/ */
export default { export default {
@ -17,7 +17,7 @@ export default {
}, },
tableData: [], tableData: [],
listQuery: { listQuery: {
pageSize: 10, pageSize: 20,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}, },

View File

@ -12,6 +12,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData"> :table-data="tableData">
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
@ -61,7 +62,7 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '原料编码', label: '原料编码',
width: 190, width: 180,
}, },
{ {
prop: 'grade', prop: 'grade',
@ -98,6 +99,7 @@ export default {
deleteURL: deleteCostMaterialSet, deleteURL: deleteCostMaterialSet,
}, },
tableProps, tableProps,
tableH: this.tableHeight(260),
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`cost:rawMaterialConfig:update`) this.$auth.hasPermi(`cost:rawMaterialConfig:update`)
? { ? {
@ -146,6 +148,9 @@ export default {
AddOrUpdate, AddOrUpdate,
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
getHotMaterialList().then((response) => { getHotMaterialList().then((response) => {
this.formConfig[0].selectOptions = response.data; this.formConfig[0].selectOptions = response.data;
}); });
@ -155,14 +160,14 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 20;
this.listQuery.materialId = val.name; this.listQuery.materialId = val.name;
this.getDataList(); this.getDataList();
break; break;
case 'reset': case 'reset':
this.$refs.searchBarForm.resetForm(); this.$refs.searchBarForm.resetForm();
this.listQuery = { this.listQuery = {
pageSize: 10, pageSize: 20,
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}; };

View File

@ -12,6 +12,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData"></base-table> :table-data="tableData"></base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -74,6 +75,7 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -114,6 +116,9 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
getHotMaterialList().then((response) => { getHotMaterialList().then((response) => {
this.formConfig[0].selectOptions = response.data; this.formConfig[0].selectOptions = response.data;
}); });
@ -138,7 +143,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 20;
this.listQuery.materialId = val.materialId; this.listQuery.materialId = val.materialId;
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime

View File

@ -12,6 +12,7 @@
:table-props="tableProps" :table-props="tableProps"
:page="listQuery.pageNo" :page="listQuery.pageNo"
:limit="listQuery.pageSize" :limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData"></base-table> :table-data="tableData"></base-table>
<pagination <pagination
:limit.sync="listQuery.pageSize" :limit.sync="listQuery.pageSize"
@ -41,7 +42,7 @@ const tableProps = [
{ {
prop: 'reportName', prop: 'reportName',
label: '时间', label: '时间',
minWidth: 150, minWidth: 160,
}, },
{ {
prop: 'rawMaterialName', prop: 'rawMaterialName',
@ -78,6 +79,7 @@ export default {
}, },
tableData: [], tableData: [],
tableProps, tableProps,
tableH: this.tableHeight(260),
drawerVisible: false, drawerVisible: false,
formConfig: [ formConfig: [
{ {
@ -132,6 +134,9 @@ export default {
}, },
components: {}, components: {},
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
@ -149,7 +154,7 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.pageNo = 1; this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10; this.listQuery.pageSize = 20;
this.listQuery.reportType = val.reportType; this.listQuery.reportType = val.reportType;
this.listQuery.materialId = val.materialId; this.listQuery.materialId = val.materialId;
this.listQuery.times = val.searchTime this.listQuery.times = val.searchTime