From b2a20419f18f8aa5a81b937b8898185ebbfe08e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Tue, 15 Aug 2023 14:16:09 +0800 Subject: [PATCH] 8.15 --- src/views/main/ExpressModule/details.vue | 369 ++++++----------------- src/views/main/ExpressModule/index.vue | 24 +- 2 files changed, 112 insertions(+), 281 deletions(-) diff --git a/src/views/main/ExpressModule/details.vue b/src/views/main/ExpressModule/details.vue index f1974b7..856f2d4 100644 --- a/src/views/main/ExpressModule/details.vue +++ b/src/views/main/ExpressModule/details.vue @@ -54,12 +54,18 @@ :wrapperCol="{ xs: { span: 25 }, sm: { span: 18 } }" has-feedback > - - + + 顺丰 + + + 普通 + + + @@ -575,19 +581,14 @@ - - + + @@ -600,28 +601,28 @@ > - - + --> + - + - + - + - + --> - + @@ -649,7 +650,7 @@ valueFormat="YYYY-MM-DD" show-time :style="{ width: '100%' }" - v-model="SearchData.setd" + v-model="SearchData.BETD" allowClear /> @@ -667,7 +668,7 @@ valueFormat="YYYY-MM-DD" show-time :style="{ width: '100%' }" - v-model="SearchData.eetd" + v-model="SearchData.EETD" allowClear /> @@ -693,185 +694,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -892,22 +744,8 @@ import { commondbCodeProvinceList, commondbCodeCityList } from '@/api/modular/main/ExpressModule' -import { GetPortloadlist, GetCarrierlist, GetPortlist, GetVessellist } from '@/api/modular/main/BookingLedger' -// import addForm from '../tmsCobLoadingPlace/addForm.vue' -// import { -// BookingOrderSFSave, -// TmsForwarderOrderUpdate, -// TmsForwarderOrderConfirm, -// TmsForwarderOrderCancel, -// TmsForwarderOrderDelete, -// BookingOrderSFGet, -// listCarGroup, -// forwarderTransTime, -// forwarderRouterPath, -// imgList -// } from '@/api/modular/main/tmsaip/ExpressModule' -// import { DjyCustomerQuerytDjyCustomerInfo } from '@/api/modular/main/SendCar' -// import { tmsCobLoadingPlacelist } from '@/api/modular/main/tmsaip/tmsCobLoadingPlace' +import { GetPortloadlist, GetCarrierlist, GetPortlist } from '@/api/modular/main/BookingLedger' +import { PageDataByBooking } from '@/api/modular/main/BookingLedger' import AAutoComplete from 'ant-design-vue/es/auto-complete' export default { components: { @@ -1063,7 +901,7 @@ export default { initTime: true, AddSVisible: false, BusinessData: [], - BusinessDataBackup: [], + BusinessLoading: false, DetailData: [], ProvinceData: [], sjCityData: [], @@ -1109,48 +947,33 @@ export default { }, methods: { ...mapActions(['setTmsAddData']), - FnSearchData() { - console.log(this.SearchData) - let Data = [] - - this.BusinessDataBackup.forEach(item2 => { - let type = true - Object.keys(this.SearchData).forEach(item => { - if (this.SearchData[item]) { - if (item == 'setd') { - if (new Date(item2[this.SearchObj[item]]).getTime() < new Date(this.SearchData[item]).getTime()) { - type = false - } - } else if (item == 'eetd') { - if (new Date(item2[this.SearchObj[item]]).getTime() > new Date(this.SearchData[item]).getTime()) { - type = false - } - } else { - if (item2[this.SearchObj[item]]) { - if (item2[this.SearchObj[item]].indexOf(this.SearchData[item]) == -1) { - type = false - } - } else { - type = false - } - } - } - }) - if (type == true) { - Data.push(item2) - } - // console.log(item2[this.SearchObj[item]], item2[this.SearchObj[item]].indexOf(this.SearchData[item]) != -1) + getListData() { + this.BusinessLoading = true + PageDataByBooking({ + multisort: [ + { sortField: 'bsstatusname', descSort: true }, + { sortField: 'mblno', descSort: true } + ], + PageNo: 1, + PageSize: 9999, + ...this.SearchData }) - - setTimeout(() => { - this.BusinessData = Data - }, 100) - - // BusinessDataBackup + .then(res => { + console.log('订舱数据', res) + this.BusinessData = res.data.items + this.BusinessLoading = false + }) + .catch(err => { + console.log('订舱数据', err) + this.BusinessLoading = false + }) + }, + FnSearchData() { + this.getListData() }, FnClearData() { this.SearchData = {} - this.BusinessData = this.BusinessDataBackup + this.getListData() }, FnChangeProvince(data, type) { commondbCodeCityList({ Provincecode: data }).then(res => { @@ -1365,8 +1188,6 @@ export default { validateFields((errors, values) => { if (!errors) { // dispatchTime - // values.business = this.BusinessData - values.business = this.BusinessDataBackup values.detail = this.DetailData this.ProvinceData.forEach(item => { if (item.code == values.fjProvinceId) { @@ -1522,10 +1343,9 @@ export default { }) }, init() { + this.BusinessData = [] this.SearchData = {} if (this.initTime) { - this.BusinessData = [] - this.BusinessDataBackup = [] this.DetailData = [] this.form.resetFields() if (this.id) { @@ -1557,8 +1377,6 @@ export default { res.data.detail.forEach((item, index) => { item.WebKey = index + 1 }) - this.BusinessData = res.data.business - this.BusinessDataBackup = res.data.business this.DetailData = res.data.detail }, 100) } else { @@ -1601,10 +1419,7 @@ export default { console.log(res.data, '目的港') this.PortData = res.data }) - // GetVessellist({ PageSize: 9999, PageNo: 1 }).then(res => { - // console.log(res.data, '船名') - // this.VesselData = res.data - // }) + this.getListData() console.log('init') setTimeout(() => { this.initTime = true @@ -1644,20 +1459,30 @@ export default { }) }, insertEvent2() { - if (!this.BusinessDataBackup) { - this.BusinessDataBackup = [] - } - console.log( - this.BusinessDataBackup, - this.BusinessDataBackup.length ? this.BusinessDataBackup[this.BusinessDataBackup.length - 1].WebKey + 1 : 1 - ) - this.BusinessDataBackup.push({ - WebKey: this.BusinessDataBackup.length - ? this.BusinessDataBackup[this.BusinessDataBackup.length - 1].WebKey + 1 - : 1, - dispatchStatus: '0' + console.log(this.BusinessData) + this.$refs.xTable2.selection.forEach(item => { + delete item.id + this.DetailData.push({ + WebKey: this.BusinessData.length ? this.BusinessData[this.BusinessData.length - 1].WebKey + 1 : 1, + ...item + }) + console.log(item) }) - this.BusinessData = this.BusinessDataBackup + console.log(this.DetailData) + // if (!this.BusinessDataBackup) { + // this.BusinessDataBackup = [] + // } + // console.log( + // this.BusinessDataBackup, + // this.BusinessDataBackup.length ? this.BusinessDataBackup[this.BusinessDataBackup.length - 1].WebKey + 1 : 1 + // ) + // this.BusinessDataBackup.push({ + // WebKey: this.BusinessDataBackup.length + // ? this.BusinessDataBackup[this.BusinessDataBackup.length - 1].WebKey + 1 + // : 1, + // dispatchStatus: '0' + // }) + // this.BusinessData = this.BusinessDataBackup }, AddShandleSubmit() { console.log(this.AddsData) diff --git a/src/views/main/ExpressModule/index.vue b/src/views/main/ExpressModule/index.vue index 1f307fc..558b174 100644 --- a/src/views/main/ExpressModule/index.vue +++ b/src/views/main/ExpressModule/index.vue @@ -139,9 +139,9 @@ - + - + {{ text == 1 ? '母单' : text == 2 ? '子单' : '签回单' }} @@ -267,7 +267,7 @@ export default { title: '收件省份', align: 'center', width: '80', - dataIndex: 'sjProvinceId' + dataIndex: 'sjProvince' }, { title: '收件城市', @@ -291,7 +291,7 @@ export default { title: '寄件省份', align: 'center', width: '80', - dataIndex: 'fjProvinceId' + dataIndex: 'fjProvince' }, { title: '寄件城市', @@ -342,15 +342,21 @@ export default { } }) }, + handleCancel() { + this.visible = false + this.KDtableData = [] + }, FnKdSchedule(row) { - console.log(row) - this.visible = true BookingOrderSFQueryKDSchedule({ Id: row.id }) .then(res => { if (res.code == 200) { - console.log(JSON.parse(JSON.parse(res.data))) - this.KDtableData = JSON.parse(JSON.parse(res.data)).msgData.waybillNoInfoList - this.visible = true + if (JSON.parse(JSON.parse(res.data)).success) { + console.log(JSON.parse(JSON.parse(res.data))) + this.KDtableData = JSON.parse(JSON.parse(res.data)).msgData.waybillNoInfoList + this.visible = true + } else { + this.$message.warning(JSON.parse(JSON.parse(res.data)).errorMsg) + } } else { this.$message.warning(res.message) }