From 076cbc9fb817354e0d6d01282b7fbdfbf8f6b708 Mon Sep 17 00:00:00 2001 From: jiangkuan Date: Tue, 25 Apr 2023 20:22:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E7=AB=99=E5=88=97?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/ViewDeletedList/ViewDeletedList.vue | 85 ++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/src/views/main/ViewDeletedList/ViewDeletedList.vue b/src/views/main/ViewDeletedList/ViewDeletedList.vue index 1001247..fac8c54 100644 --- a/src/views/main/ViewDeletedList/ViewDeletedList.vue +++ b/src/views/main/ViewDeletedList/ViewDeletedList.vue @@ -297,7 +297,77 @@ export default { pageSize: 20, pageSizes: [10, 20, 50, 100, 200, 500], }, - columns: JSON.parse(JSON.stringify(initData.columns)), + columns: [{noDraggable: true, +type: "checkbox", +width: 60}, + { + field: 'mblno', + label: 'MBLNO', + width: 160, + title: '主提单号', + showHeaderOverflow: true, + showOverflow: false, + sortable: true, + slots: { default: 'mblno' } + }, + { + field: 'createdTime', + label: 'CREATEDTIME', + width: 160, + title: '创建日期', + showHeaderOverflow: true, + sortable: true + },{ + field: 'createdUserName', + label: 'CREATEDUSERNAME', + width: 120, + title: '创建人', + showHeaderOverflow: true, + sortable: true + }, + { + field: 'etd', + label: 'ETD', + width: 110, + title: '开船日期', + showHeaderOverflow: true, + sortable: true, + slots: { default: 'etd' } + }, + { + field: 'customername', + label: 'CUSTOMERNAME', + width: 120, + title: '委托单位', + showHeaderOverflow: true, + sortable: true + }, // 客户 + { field: 'consignee', label: 'CONSIGNEE', width: 120, title: '收货人', showHeaderOverflow: true, sortable: true }, + { + field: 'notifyparty', + label: 'NOTIFYPARTY', + width: 120, + title: '通知人', + showHeaderOverflow: true, + sortable: true + }, + { field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true }, + { + field: 'portdischarge', + label: 'PORTDISCHARGE', + width: 120, + title: '卸货港', + showHeaderOverflow: true, + sortable: true + },{ + field: 'operate', + title: '操作', + width: 110, + noDraggable: true, + slots: { default: 'operate' }, + fixed: 'right', + resizable: false + }], data: [], // treeConfig: { // transform: true, @@ -562,16 +632,19 @@ export default { switch (item.type) { case 'booking_list_cond': this.$set($data, 'booking_list_cond', item) + // this.setFormData(item, false, true) break case 'booking_list_column': this.$set($data, 'booking_list_column', item) + console.log("item==>>",item) // this.setTableList(item) break case 'booking_list_page': this.setPageSize(item) break } + }) if (Object.keys($data).includes('booking_list_cond')) { @@ -655,6 +728,7 @@ export default { console.log(err) }) }, + //日期 setFormData(data, isReset = false, isInit = false) { if (Object.keys(data).length > 0 && JSON.parse(data.configJson).length) { const arr = JSON.parse(data.configJson) @@ -712,16 +786,20 @@ export default { } this.$forceUpdate() }, + // 表头 setTableList(data) { if (Object.keys(data).length > 0 && JSON.parse(data.configJson).length) { this.formTableData = JSON.parse(data.configJson) + const nowTableArr = this.formTableData.map((item, index) => { if (item.field === 'operate') { item.width = 110 } return item.field }) - this.gridOptions.columns = JSON.parse(JSON.stringify(this.formTableData)) + // console.log('手写的',this.gridOptions.columns) + // this.gridOptions.columns = JSON.parse(JSON.stringify(this.formTableData)) + // console.log('赋值的',this.gridOptions.columns) const moreTableArr = [] this.fromTableAllData.map((item, index) => { if (!nowTableArr.includes(item.field)) { @@ -743,6 +821,7 @@ export default { this.formMoreTableData = moreTableArr this.$forceUpdate() } + }, setPageSize(data) { if (data && JSON.parse(data.configJson)) { @@ -832,6 +911,7 @@ export default { this.searchData = JSON.parse(JSON.stringify(data)) this.init(this.searchData) this.formRes = data + }, tableMoreRefresh() { const arr = this.formRes.MBLNO.split(/,|,/) @@ -947,6 +1027,7 @@ export default { this.showColumns = arr this.gridOptions.columns = arr this.$forceUpdate() + }, // handledbclick({ row }) { // this.editColumns(row) From edfccd5e5d06ce7edd2b4edf3849317f1951bffe Mon Sep 17 00:00:00 2001 From: jiangkuan Date: Wed, 26 Apr 2023 09:21:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/ViewDeletedList/ViewDeletedList.vue | 170 +++++++++--------- 1 file changed, 87 insertions(+), 83 deletions(-) diff --git a/src/views/main/ViewDeletedList/ViewDeletedList.vue b/src/views/main/ViewDeletedList/ViewDeletedList.vue index fac8c54..f9646ad 100644 --- a/src/views/main/ViewDeletedList/ViewDeletedList.vue +++ b/src/views/main/ViewDeletedList/ViewDeletedList.vue @@ -6,9 +6,9 @@ - - - + + + @@ -260,7 +260,7 @@ export default { }, data() { return { - SearchContent:'', + SearchContent: '', spinning: false, TaskShippingOrderCompareVisible: false, TaskShippingOrderCompareData: { @@ -297,77 +297,86 @@ export default { pageSize: 20, pageSizes: [10, 20, 50, 100, 200, 500], }, - columns: [{noDraggable: true, -type: "checkbox", -width: 60}, + columns: [ + { noDraggable: true, type: 'checkbox', width: 60 }, { - field: 'mblno', - label: 'MBLNO', - width: 160, - title: '主提单号', - showHeaderOverflow: true, - showOverflow: false, - sortable: true, - slots: { default: 'mblno' } - }, - { - field: 'createdTime', - label: 'CREATEDTIME', - width: 160, - title: '创建日期', - showHeaderOverflow: true, - sortable: true - },{ - field: 'createdUserName', - label: 'CREATEDUSERNAME', - width: 120, - title: '创建人', - showHeaderOverflow: true, - sortable: true - }, - { - field: 'etd', - label: 'ETD', - width: 110, - title: '开船日期', - showHeaderOverflow: true, - sortable: true, - slots: { default: 'etd' } - }, - { - field: 'customername', - label: 'CUSTOMERNAME', - width: 120, - title: '委托单位', - showHeaderOverflow: true, - sortable: true - }, // 客户 - { field: 'consignee', label: 'CONSIGNEE', width: 120, title: '收货人', showHeaderOverflow: true, sortable: true }, - { - field: 'notifyparty', - label: 'NOTIFYPARTY', - width: 120, - title: '通知人', - showHeaderOverflow: true, - sortable: true - }, - { field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true }, - { - field: 'portdischarge', - label: 'PORTDISCHARGE', - width: 120, - title: '卸货港', - showHeaderOverflow: true, - sortable: true - },{ - field: 'operate', - title: '操作', - width: 110, - noDraggable: true, - slots: { default: 'operate' }, - fixed: 'right', - resizable: false - }], + field: 'mblno', + label: 'MBLNO', + minwidth: 160, + title: '主提单号', + showHeaderOverflow: true, + showOverflow: false, + sortable: true, + slots: { default: 'mblno' }, + }, + { + field: 'createdTime', + label: 'CREATEDTIME', + width: 160, + title: '创建日期', + showHeaderOverflow: true, + sortable: true, + }, + { + field: 'createdUserName', + label: 'CREATEDUSERNAME', + minwidth: 160, + title: '创建人', + showHeaderOverflow: true, + sortable: true, + }, + { + field: 'etd', + label: 'ETD', + minwidth: 160, + title: '开船日期', + showHeaderOverflow: true, + sortable: true, + slots: { default: 'etd' }, + }, + { + field: 'customername', + label: 'CUSTOMERNAME', + minwidth: 160, + title: '委托单位', + showHeaderOverflow: true, + sortable: true, + }, // 客户 + { + field: 'consignee', + label: 'CONSIGNEE', + minwidth: 120, + title: '收货人', + showHeaderOverflow: true, + sortable: true, + }, + { + field: 'notifyparty', + label: 'NOTIFYPARTY', + width: 160, + title: '通知人', + showHeaderOverflow: true, + sortable: true, + }, + { field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true }, + { + field: 'portdischarge', + label: 'PORTDISCHARGE', + minwidth: 160, + title: '卸货港', + showHeaderOverflow: true, + sortable: true, + }, + { + field: 'operate', + title: '操作', + minwidth: 110, + noDraggable: true, + slots: { default: 'operate' }, + fixed: 'right', + resizable: false, + }, + ], data: [], // treeConfig: { // transform: true, @@ -620,7 +629,6 @@ width: 60}, } this.gridOptions.data = [] this.getList(queryParam) - }, getConfigUser(isInit = false) { const query = { @@ -632,19 +640,18 @@ width: 60}, switch (item.type) { case 'booking_list_cond': this.$set($data, 'booking_list_cond', item) - + // this.setFormData(item, false, true) break case 'booking_list_column': this.$set($data, 'booking_list_column', item) - console.log("item==>>",item) + console.log('item==>>', item) // this.setTableList(item) break case 'booking_list_page': this.setPageSize(item) break } - }) if (Object.keys($data).includes('booking_list_cond')) { @@ -821,7 +828,6 @@ width: 60}, this.formMoreTableData = moreTableArr this.$forceUpdate() } - }, setPageSize(data) { if (data && JSON.parse(data.configJson)) { @@ -906,12 +912,11 @@ width: 60}, console.log('== 展开结束 ==', new Date().getTime() - start) }, tableRefresh() { - this.formRes.MBLNO = this.SearchContent + this.formRes.MBLNO = this.SearchContent const data = { ...this.formRes } this.searchData = JSON.parse(JSON.stringify(data)) this.init(this.searchData) this.formRes = data - }, tableMoreRefresh() { const arr = this.formRes.MBLNO.split(/,|,/) @@ -947,7 +952,7 @@ width: 60}, }, tableReset() { - this.SearchContent = '' + this.SearchContent = '' }, submitForm(data) { @@ -1027,7 +1032,6 @@ width: 60}, this.showColumns = arr this.gridOptions.columns = arr this.$forceUpdate() - }, // handledbclick({ row }) { // this.editColumns(row)