From 49604f23c24983e4b0cfef8e16093ad6a0dad315 Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Tue, 14 Feb 2023 15:35:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basicConfig/components/deviceAdd.vue | 9 +++++++-- .../components/inAndOutManagementAdd.vue | 3 +++ .../consumablesManagement/inAndOutRecords.vue | 6 ++---- .../consumablesManagement/materialTracking.vue | 15 +++++++++++---- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/views/basicConfig/components/deviceAdd.vue b/src/views/basicConfig/components/deviceAdd.vue index 0872992..3e531a9 100644 --- a/src/views/basicConfig/components/deviceAdd.vue +++ b/src/views/basicConfig/components/deviceAdd.vue @@ -190,6 +190,7 @@ import { } from '@/api/basicConfig' import { commonUploadPath } from '@/api/app' import { getToken } from '@/utils/auth' +import moment from 'moment' export default { name: 'ConsumablesAdd', data() { @@ -205,8 +206,8 @@ export default { price: '', imgId: '', supplier: '', - purchaseDate: '', - productDate: '', + purchaseDate: moment().format('YYYY-MM-DD'), + productDate: moment().format('YYYY-MM-DD'), remark: '', enabled: 1 }, @@ -255,7 +256,11 @@ export default { } this.form.supplier = res.data.supplier this.form.purchaseDate = res.data.purchaseDate + ? res.data.purchaseDate + : '' this.form.productDate = res.data.productDate + ? res.data.productDate + : '' this.form.remark = res.data.remark this.form.enabled = res.data.enabled } diff --git a/src/views/consumablesManagement/components/inAndOutManagementAdd.vue b/src/views/consumablesManagement/components/inAndOutManagementAdd.vue index 01f86e6..9d6cc17 100644 --- a/src/views/consumablesManagement/components/inAndOutManagementAdd.vue +++ b/src/views/consumablesManagement/components/inAndOutManagementAdd.vue @@ -246,6 +246,9 @@ export default { this.form.minNum = res.data.minNum ? res.data.minNum : 0 this.form.maxNum = res.data.maxNum ? res.data.maxNum : 0 this.form.remark = res.data.remark + this.form.recipient = this.$store.getters.username + ? this.$store.getters.username + : '' }) if (param.type === 'edit') { this.showEdit = true diff --git a/src/views/consumablesManagement/inAndOutRecords.vue b/src/views/consumablesManagement/inAndOutRecords.vue index 5ecb141..334b39c 100644 --- a/src/views/consumablesManagement/inAndOutRecords.vue +++ b/src/views/consumablesManagement/inAndOutRecords.vue @@ -197,7 +197,6 @@ export default { methods: { getList() { getOutInRecordRecord({ ...this.listQuery }).then((res) => { - console.log(res) if (res.code === 0) { this.total = res.data.total this.tableData = res.data.records @@ -205,7 +204,6 @@ export default { }) }, selectChanged(val) { - console.log(val) if (val.value) { let id = null let line = JSON.parse(localStorage.getItem('publicList')).proLineVoList @@ -217,6 +215,8 @@ export default { }) sideLibraryList({ id }).then((res) => { if (res.code === 0) { + this.formConfig[0].defaultSelect = + this.$refs.searchBarForm.formInline.timeVal this.formConfig[3].selectOptions = res.data this.formConfig[3].defaultSelect = null } @@ -225,14 +225,12 @@ export default { }, getMaterialList() { materialList().then((res) => { - console.log(res) if (res.code === 0) { this.formConfig[4].selectOptions = res.data } }) }, buttonClick(val) { - console.log(val) if (val.btnName === 'search') { this.listQuery.startTime = val.timeVal ? val.timeVal[0] : '' this.listQuery.endTime = val.timeVal ? val.timeVal[1] : '' diff --git a/src/views/consumablesManagement/materialTracking.vue b/src/views/consumablesManagement/materialTracking.vue index 5ab9f47..5716c42 100644 --- a/src/views/consumablesManagement/materialTracking.vue +++ b/src/views/consumablesManagement/materialTracking.vue @@ -13,6 +13,12 @@ :max-height="tableH" :row-class-name="tableRowClassName" /> + { - this.tableH = tableHeight(230) + this.tableH = tableHeight(270) }) this.getList() }, @@ -129,7 +135,8 @@ export default { getList() { onlineMaterialTrackSelect({ ...this.listQuery }).then((res) => { if (res.code === 0) { - this.tableData = res.data + this.tableData = res.data.records + this.total = res.data.total ? res.data.total : 0 } }) },