From 45fc3d9a28576cbdf3d681942b47b8bf33d5bc2f Mon Sep 17 00:00:00 2001 From: lilu Date: Fri, 13 Jan 2023 15:08:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=B6=E9=87=8D?= =?UTF-8?q?=E5=B0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/modules/mailingInfo.vue | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index 83a8801..f51f1b3 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -1839,7 +1839,9 @@ export default { const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g); console.log('分割数组:', regexStr) if (regexStr && Number(regexStr[0])) { - pkgs += Number(regexStr[0]) + // pkgs += Number(regexStr[0]) + const num1 = Number(regexStr[0]) + pkgs = (pkgs * 100 + num1 * 100) / 100 } if (!kindpkgs && regexStr && /^[a-zA-Z]+$/.test(regexStr[1])) { kindpkgs = regexStr[1] @@ -1859,7 +1861,9 @@ export default { const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g); console.log('分割数组:', regexStr) if (regexStr && Number(regexStr[0])) { - kgs += Number(regexStr[0]) + // kgs += Number(regexStr[0]) + const num1 = Number(regexStr[0]) + kgs = (kgs * 100 + num1 * 100) / 100 } }) console.log('总重量:', kgs) @@ -1875,10 +1879,25 @@ export default { const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g); console.log('分割数组:', regexStr) if (regexStr && Number(regexStr[0])) { - cbm += Number(regexStr[0]) + // cbm += Number(regexStr[0]) + const num1 = Number(regexStr[0]) + cbm = (cbm * 100 + num1 * 100) / 100 } }) - console.log('总重量:', cbm) + // cbm += '' + // let res = null + // const pNum = cbm.split('.') + // if (!/\./.test(cbm)) { + // res = cbm + '.00' + // } else if (pNum[1].length < 2) { + // res = cbm + '0' + // } else if (pNum.length > 1) { + // res = pNum[0] + '.' + pNum[1].substr(0, 1) + // console.log(pNum[0], pNum[1].substr(0, 1)) + // } else { + // res = cbm + // } + console.log('尺码: ', cbm) this.details.cbm = cbm } } From f4ddf1d30d1df94fa19d5d7479a1b2032b7add4d Mon Sep 17 00:00:00 2001 From: lilu Date: Fri, 13 Jan 2023 15:50:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9esl=E8=88=AA=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/modules/basicInfo.vue | 46 +++++++++++++------ .../detail/modules/mailingInfo.vue | 16 +++---- src/views/main/DjyApiAuth/modules/addForm.vue | 16 +++---- 3 files changed, 49 insertions(+), 29 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/basicInfo.vue b/src/views/main/BookingLedger/detail/modules/basicInfo.vue index 037d846..ef669ad 100644 --- a/src/views/main/BookingLedger/detail/modules/basicInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/basicInfo.vue @@ -262,19 +262,36 @@ - - - - - - + + -->
-->
-->
- + - {{ formData.apiSecret }} - + {{ formData.apiKey }} + - + - {{ formData.apiKey }} - + {{ formData.apiSecret }} + From 7a953b04f88374777310856dcaec23cacb244060 Mon Sep 17 00:00:00 2001 From: lilu Date: Fri, 13 Jan 2023 17:32:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?api=E6=8E=A5=E5=8F=A3=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/DjyApiAuth/index.vue | 124 +++++++++++++++--- src/views/main/DjyApiAuth/modules/addForm.vue | 36 ++--- 2 files changed, 117 insertions(+), 43 deletions(-) diff --git a/src/views/main/DjyApiAuth/index.vue b/src/views/main/DjyApiAuth/index.vue index 32b2ecd..16bb9f1 100644 --- a/src/views/main/DjyApiAuth/index.vue +++ b/src/views/main/DjyApiAuth/index.vue @@ -25,56 +25,84 @@ - + - + /> --> + + + + {{ item.name }} + + - + - --> + - + - - - 启用 - - - 禁用 - - - 全部 - - + + 全部 + 启用 + 禁用 + - + 查询 重置 @@ -137,8 +165,11 @@ import { DeleteApi, GetApiDetail, DisableApi, - ResetApi + ResetApi, + SysTenantPage, + GetSysUserPage } from '@/api/modular/main/DjyApiAuth' +import { AutoComplete } from 'ant-design-vue' export default { name: 'BookingLedger', @@ -146,6 +177,7 @@ export default { XCard, columnSetting, addForm, + AutoComplete }, data() { return { @@ -186,12 +218,32 @@ export default { addFormType: 'add', addFromIndex: null, apiInterface: [], + TenantData: [], + userList: [] } }, + computed: { + userListArr() { + if (this.userList) { + const arr = [] + this.userList.map((item, index) => { + if (!arr.includes(item.name)) { + arr.push(item.name) + } + }) + return arr + } else { + return [] + } + } + }, created() { this.getList() this.apiInterface = this.$options.filters['dictData']('api_interface') console.log('apiInterface', this.apiInterface) + SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => { + this.TenantData = res.data.rows + }) }, mounted() {}, methods: { @@ -402,7 +454,37 @@ export default { cancel() {}, filterOption(input, option) { return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 - } + }, + getUserList(name = '') { + const tenantName = this.form.getFieldValue('TenantName') + let tenantId = '' + this.TenantData.map((item, index) => { + if (tenantName === item.name) { + tenantId = item.id + } + }) + GetSysUserPage({ + name: name, + tenantId: tenantId + }) + .then(res => { + if (res.success) { + this.userList = res.data + } + }) + .catch(err => { + console.log(err) + }) + }, + // userSelect(value) { + // const index = this.userListArr.indexOf(value) + // this.formData.userId = this.userList[index].id || '' + // this.formData.userName = this.userList[index].name || '' + // this.formData.userCode = this.userList[index].account || '' // ?? 用户代码 + // }, + userChange(value) { + this.getUserList(value) + }, } } diff --git a/src/views/main/DjyApiAuth/modules/addForm.vue b/src/views/main/DjyApiAuth/modules/addForm.vue index 69fd01e..492e13c 100644 --- a/src/views/main/DjyApiAuth/modules/addForm.vue +++ b/src/views/main/DjyApiAuth/modules/addForm.vue @@ -51,6 +51,7 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback + prop="tenantName" > - - - - - { if (res.success) { @@ -259,14 +251,14 @@ import { }) }, - // 销售 - saleSelect(value) { + userSelect(value) { const index = this.userListArr.indexOf(value) this.formData.userId = this.userList[index].id || '' this.formData.userName = this.userList[index].name || '' + this.formData.userCode = this.userList[index].account || '' // ?? 用户代码 }, - saleChange(value) { - this.getUserList(value, 'sale') + userChange(value) { + this.getUserList(value) }, changeExpireDate (date, dateString) { console.log(dateString) @@ -297,7 +289,7 @@ import { }, apiHandleChange (value) { console.log(value) - this.formData.apiCode = this.apiInterface[value].id + this.formData.apiCode = this.apiInterface[value].code this.formData.apiName = this.apiInterface[value].name } }