From cab8c1637c2ce3ecc12926eecd9890a8b2ac549a Mon Sep 17 00:00:00 2001 From: chendaze <1824191732@qq.com> Date: Wed, 10 Apr 2024 15:13:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin/customer.js | 4 +-- src/views/admin/CustomerEdit.vue | 25 ++++++------------- .../admin/meeting/ShowroomRecordList.vue | 4 +-- .../admin/meeting/modules/TicketModal.vue | 2 +- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/api/admin/customer.js b/src/api/admin/customer.js index 385cba9..ae31244 100644 --- a/src/api/admin/customer.js +++ b/src/api/admin/customer.js @@ -130,9 +130,9 @@ export function getCustomer (parameter) { }) } -export function importData (data) { +export function importData (data,customerId) { return axios({ - url: api.icsCustomerStaff + '/importData', + url: api.icsCustomerStaff + '/importData?customerId='+ customerId, method: 'post', data: data }) diff --git a/src/views/admin/CustomerEdit.vue b/src/views/admin/CustomerEdit.vue index b247649..624f9e9 100644 --- a/src/views/admin/CustomerEdit.vue +++ b/src/views/admin/CustomerEdit.vue @@ -780,41 +780,30 @@ export default { const baseURL = process.env.VUE_APP_API_BASE_URL window.open(`${baseURL}/admin/staff/exportTemplate`) }, - // downloadFile(data) { - // let fileName = '客户导入模板' - // - // let link = document.createElement('a') - // let blob = new Blob([data], { type: 'application/vnd.ms-excel;charset=utf-8' }) - // console.log(blob) - // link.style.display = 'none' - // link.download = fileName + '.xlsx' - // link.href = URL.createObjectURL(blob) - // // link.setAttribute('download', fileName+'.xlsx'); - // document.body.appendChild(link) - // link.click() - // URL.revokeObjectURL(link.href) // 释放URL 对象 - // document.body.removeChild(link) - // }, + customRequest(file) { // file 是上传的文件 其内容会在放在下面截图中 // 后端需要接受的参数是 formData数据, // uploadFile 我自己的接口 - + let customerId = this.$route.query.customerId const formData = new FormData() formData.append('file', file.file) console.log(file) - importData(formData).then(res => { + importData(formData,customerId).then(res => { if (res.code == 0) { // 调用组件内方法, 设置为成功状态 file.onSuccess(res, file.file) file.status = 'done' this.visible = false - this.$message.success(res.msg) + this.$message.success(res.data) + this.getContastsList() } else { + this.$message.error(res.msg) file.onError() file.status = 'error' + this.getContastsList() } }) }, diff --git a/src/views/admin/meeting/ShowroomRecordList.vue b/src/views/admin/meeting/ShowroomRecordList.vue index 106c8a6..aa7dcb6 100644 --- a/src/views/admin/meeting/ShowroomRecordList.vue +++ b/src/views/admin/meeting/ShowroomRecordList.vue @@ -4,8 +4,8 @@ - - + + diff --git a/src/views/admin/meeting/modules/TicketModal.vue b/src/views/admin/meeting/modules/TicketModal.vue index 1351a24..699f89f 100644 --- a/src/views/admin/meeting/modules/TicketModal.vue +++ b/src/views/admin/meeting/modules/TicketModal.vue @@ -503,9 +503,9 @@ export default { e.preventDefault() this.form.validateFields((err, values) => { if (!err) { - console.log('Received values of form: ', values) // 选择企业 values.ticketCustomerVo = this.selectEnterpriseDataList + values.num = this.publicSendNum this.confirmLoading = true saveTicket(values).then(res => { if (res.code === 0) {