From 421c8a8aa0c9341772442e04ac4cbd84f6bcfb2b Mon Sep 17 00:00:00 2001 From: lilu Date: Fri, 13 Jan 2023 14:15:20 +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 | 214 +++++++++++++++++- .../detail/modules/rightContent.vue | 16 +- src/views/main/DjyApiAuth/index.vue | 59 ++--- src/views/main/DjyApiAuth/modules/addForm.vue | 73 ++++-- 4 files changed, 309 insertions(+), 53 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index e550b92..1de897e 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -543,8 +543,11 @@ has-feedback prop="pkgs" > - - +
+ + + +
@@ -581,6 +584,7 @@
+ KGS
@@ -597,6 +601,7 @@
+ CBM
@@ -677,6 +682,110 @@ + + + +
+ + +
+ 箱数或件数 + No.of containers or pkgs +
+
+ +
+
+ + + + + + + + + + + + + +
+
+ + +
+ 毛重(公斤) + Gross Weight +
+
+ +
+
+
+ 总重量: + + KGS +
+
+
+ + +
+ 尺码(立方米) + Gross Weight +
+
+ +
+
+
+ 总重量: + + CBM +
+
+
+
+ +
+ @@ -767,7 +876,9 @@ export default { customerModelconfirm: false, showShipper: '', showConsignee: '', - showNotifier: '' + showNotifier: '', + textEntryModalVisible: false, + textEntryType: '' } }, watch: { @@ -1700,6 +1811,67 @@ export default { this.changePkgs() } this.$forceUpdate() + }, + editTextEntryModel (type) { + this.textEntryModalVisible = true + this.textEntryType = type + }, + textEntryClose () { + this.textEntryModalVisible = false + this.textEntryType = false + }, + // 件数包装修改 + pkgsTextChange () { + const pkgsTexyVal = this.details.pkgsTotal + const arr = pkgsTexyVal.split(/\n|\r/g) + let pkgs = 0 + let kindpkgs = '' + console.log('arr:', arr) + arr.map((item, index) => { + const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g); + console.log('分割数组:', regexStr) + if (regexStr && Number(regexStr[0])) { + pkgs += Number(regexStr[0]) + } + if (!kindpkgs && regexStr && /^[a-zA-Z]+$/.test(regexStr[1])) { + kindpkgs = regexStr[1] + } + }) + console.log('包装:', kindpkgs, ' 、件数:', pkgs) + this.details.pkgs = pkgs + this.details.kindpkgs = kindpkgs + }, + // 毛重修改 + kgsTextChange () { + const kgsTexyVal = this.details.kgsTotal + const arr = kgsTexyVal.split(/\n|\r/g) + let kgs = 0 + console.log('arr:', arr) + arr.map((item, index) => { + const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g); + console.log('分割数组:', regexStr) + if (regexStr && Number(regexStr[0])) { + kgs += Number(regexStr[0]) + } + }) + console.log('总重量:', kgs) + this.details.kgs = kgs + }, + // 尺码修改 + cbmTextChange () { + const cbmTexyVal = this.details.cbmTotal + const arr = cbmTexyVal.split(/\n|\r/g) + let cbm = 0 + console.log('arr:', arr) + arr.map((item, index) => { + const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g); + console.log('分割数组:', regexStr) + if (regexStr && Number(regexStr[0])) { + cbm += Number(regexStr[0]) + } + }) + console.log('总重量:', cbm) + this.details.cbm = cbm } } } @@ -1918,6 +2090,7 @@ export default { .line-box { display: flex; margin-top: 6px; + overflow: hidden; span.unit { font-size: 12px; color: #999; @@ -1926,6 +2099,12 @@ export default { line-height: 28px; padding-left: 5px; } + .edit-icon{ + font-size: 14px; + line-height: 28px; + margin-left: 4px; + cursor: pointer; + } } .required{ @@ -2009,4 +2188,33 @@ export default { right: 8px !important; } +.text-entry-box { + .tit{ + height:40px; + line-height:40px; + font-size:14px; + color: #333; + margin-bottom: 6px; + } + .text-res { + margin-top: 20px; + .kgs-label{ + display: flex; + .left{ + line-height: 28px; + display: block; + width: 68px; + text-align: left; + } + .unit{ + display: block; + width: 60px; + margin-left:10px; + text-align: left; + line-height: 28px; + } + } + } +} + diff --git a/src/views/main/BookingLedger/detail/modules/rightContent.vue b/src/views/main/BookingLedger/detail/modules/rightContent.vue index 939586d..19d108c 100644 --- a/src/views/main/BookingLedger/detail/modules/rightContent.vue +++ b/src/views/main/BookingLedger/detail/modules/rightContent.vue @@ -113,7 +113,7 @@
{{ child.opTime }} - {{ child.status }} + {{ child.status }} 箱号:{{ child.cntrno }}
@@ -775,6 +775,11 @@ export default { } .log-name { flex: 1; + .min-log{ + font-size: 12px; + color: #999; + margin-left: 4px; + } } } .child-log { @@ -829,6 +834,15 @@ export default { } .log-name { flex: 1; + display: flex; + .min-log{ + font-size: 12px; + color: #999; + margin-left: 4px; + flex: 1; + text-overflow: ellipsis; + white-space: nowrap; + } } } .hideline { diff --git a/src/views/main/DjyApiAuth/index.vue b/src/views/main/DjyApiAuth/index.vue index 50473c7..32b2ecd 100644 --- a/src/views/main/DjyApiAuth/index.vue +++ b/src/views/main/DjyApiAuth/index.vue @@ -6,34 +6,26 @@
- + - + + + {{ api.name }} / {{ api.code }} + + - - - - - - + - + - + - + 查询 重置 @@ -122,7 +114,7 @@ 删除 启用 禁用 - + 重置秘钥 @@ -131,7 +123,7 @@ - +
diff --git a/src/views/main/DjyApiAuth/modules/addForm.vue b/src/views/main/DjyApiAuth/modules/addForm.vue index 9017c21..fd8c669 100644 --- a/src/views/main/DjyApiAuth/modules/addForm.vue +++ b/src/views/main/DjyApiAuth/modules/addForm.vue @@ -15,24 +15,24 @@ - - - - - - + + + {{ api.name }} / {{ api.code }} + + @@ -58,7 +58,7 @@ placeholder="请选择租户" :default-active-first-option="false" :show-arrow="false" - :filter-option="false" + :filter-option="filterOption" :not-found-content="null" @select="tenantSelect" > @@ -106,7 +106,8 @@ has-feedback style="margin-bottom:0;" > - {{ formData.apiSecret }} + {{ formData.apiSecret }} + @@ -117,7 +118,8 @@ has-feedback style="margin-bottom:0;" > - {{ formData.apiKey }} + {{ formData.apiKey }} + @@ -156,6 +158,10 @@ import { formData: { type: Object, default: null + }, + index: { + type: Number, + default: null } }, data () { @@ -186,7 +192,8 @@ import { rules: { apiCode: [{ required: true, message: '请输入接口代码!', trigger: 'change' }], apiName: [{ required: true, message: '请输入接口名称!', trigger: 'change' }] - } + }, + apiInterface: [] } }, computed: { @@ -205,6 +212,8 @@ import { } }, mounted () { + 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 }) @@ -226,6 +235,7 @@ import { }, handleCancel () { this.$refs.addFrom.clearValidate() + this.$parent.$data.addFromIndex = null this.visible = false }, tenantIdSearch(value) { @@ -267,9 +277,28 @@ import { this.formData.tenantName = this.TenantData[value].name || '' }, setDisableFun () { - debugger - this.$parent.setDisableFun(this.formData) - // this.$parent.init() + this.$parent.setDisableFun({ + ...this.formData, + ...{ row_id: this.index }, + ...{ isDisable: !this.formData.isDisable } + }) + }, + copyFun(data) { + const copyInput = document.createElement('input') + document.body.appendChild(copyInput) + copyInput.setAttribute('value', data) + copyInput.select() + document.execCommand('Copy', false, null) + this.$message.success('复制成功') + copyInput.remove() + }, + filterOption(input, option) { + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + apiHandleChange (value) { + console.log(value) + this.formData.apiCode = this.apiInterface[value].id + this.formData.apiName = this.apiInterface[value].name } } } @@ -293,4 +322,8 @@ import { margin-left: 10px; font-size: 12px; } + .copy-tip{ + margin-left: 10px; + color: @primary-color; + } From 36fd9aa5bd1dc2675d6f649b8d64c2e548adb93a Mon Sep 17 00:00:00 2001 From: lilu Date: Fri, 13 Jan 2023 14:32:23 +0800 Subject: [PATCH 2/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 | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index 1de897e..3268ddb 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -684,14 +684,14 @@ - +
-
+
-
+ @@ -734,14 +733,14 @@ -
+
-->
-
+
-
+ -
+
-
+
@@ -878,7 +877,8 @@ export default { showConsignee: '', showNotifier: '', textEntryModalVisible: false, - textEntryType: '' + textEntryType: '', + textEntryModalTitle: '' } }, watch: { @@ -1814,10 +1814,18 @@ export default { }, editTextEntryModel (type) { this.textEntryModalVisible = true + if (type === 'pkgs') { + this.textEntryModalTitle = '件数/箱型' + } else if (type === 'kgs') { + this.textEntryModalTitle = '毛重(公斤)' + } else if (type === 'cbm') { + this.textEntryModalTitle = '尺码(立方米)' + } this.textEntryType = type }, textEntryClose () { this.textEntryModalVisible = false + this.textEntryModalTitle = '' this.textEntryType = false }, // 件数包装修改 From f88e4958e55be8a2476175e5e0cf5f982fd7abbe Mon Sep 17 00:00:00 2001 From: lilu Date: Fri, 13 Jan 2023 14:44:06 +0800 Subject: [PATCH 3/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 --- .../BookingLedger/detail/modules/mailingInfo.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index 3268ddb..83a8801 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -684,7 +684,7 @@ - +
@@ -696,7 +696,7 @@
@@ -745,7 +745,7 @@
@@ -767,7 +767,7 @@
@@ -781,7 +781,7 @@
@@ -1815,11 +1815,11 @@ export default { editTextEntryModel (type) { this.textEntryModalVisible = true if (type === 'pkgs') { - this.textEntryModalTitle = '件数/箱型' + this.textEntryModalTitle = '件数/包装' } else if (type === 'kgs') { - this.textEntryModalTitle = '毛重(公斤)' + this.textEntryModalTitle = '毛重' } else if (type === 'cbm') { - this.textEntryModalTitle = '尺码(立方米)' + this.textEntryModalTitle = '尺码' } this.textEntryType = type },