From 2fb67070facb9b83c2038ed47ed0c26f8bca8898 Mon Sep 17 00:00:00 2001 From: sunzehua Date: Fri, 16 Aug 2024 08:37:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=84=E7=A7=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 12 +- .env.development | 12 +- .../detail/components/selectView.vue | 140 +++---- src/views/main/DjyTenantConfig/index.vue | 2 +- src/views/main/Taskmanage/BCModify/index.vue | 302 +++++++++++---- src/views/main/vesselinfo/addForm.vue | 18 +- src/views/main/vesselinfo/editForm.vue | 364 ++++++------------ src/views/main/vesselinfo/index.vue | 7 +- 8 files changed, 447 insertions(+), 410 deletions(-) diff --git a/.env b/.env index 33e92d4..99f2e07 100644 --- a/.env +++ b/.env @@ -1,14 +1,14 @@ NODE_ENV=production VUE_APP_PREVIEW=true # VUE_APP_TYPE = 'customer' -# VUE_APP_TYPE = 'hechuan' +VUE_APP_TYPE = 'hechuan' # VUE_APP_TYPE = 'yunyingduan' -VUE_APP_TYPE = 'gangjie' +# VUE_APP_TYPE = 'gangjie' # 打包部署的三个端 客户端customer 和川端hechuan 运营端djy # 和川大简云正式 -# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api -# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 +VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api +VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 # 和川大简云测试 # VUE_APP_API_BASE_URL=http://60.209.125.238:35100 @@ -23,8 +23,8 @@ VUE_APP_TYPE = 'gangjie' # VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:30814 # 港捷 -VUE_APP_API_BASE_URL=http://118.190.144.189:5001 -VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001 +# VUE_APP_API_BASE_URL=http://118.190.144.189:5001 +# VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001 # 客户端正式 # VUE_APP_API_BASE_URL=http://118.190.144.189:6001 diff --git a/.env.development b/.env.development index ed1d2a1..cf7bf3e 100644 --- a/.env.development +++ b/.env.development @@ -1,14 +1,14 @@ NODE_ENV=development VUE_APP_PREVIEW=true # VUE_APP_TYPE = 'customer' -# VUE_APP_TYPE = 'hechuan' +VUE_APP_TYPE = 'hechuan' # VUE_APP_TYPE = 'yunyingduan' -VUE_APP_TYPE = 'gangjie' +# VUE_APP_TYPE = 'gangjie' # 打包部署的三个端 客户端customer 和川端hechuan 运营端yunyingduan # 和川大简云正式 -# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api -# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 +VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api +VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 # 和川大简云测试 # VUE_APP_API_BASE_URL=http://60.209.125.238:35100 @@ -26,8 +26,8 @@ VUE_APP_TYPE = 'gangjie' # VUE_APP_SOCKET_BASE_URL=http://192.168.0.80:7373/ # 港捷 -VUE_APP_API_BASE_URL=http://118.190.144.189:5001 -VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001 +# VUE_APP_API_BASE_URL=http://118.190.144.189:5001 +# VUE_APP_SOCKET_BASE_URL=http://118.190.144.189:5001 # 运营端正式 # VUE_APP_API_BASE_URL=http://118.190.144.189:6002 diff --git a/src/views/main/BookingLedger/detail/components/selectView.vue b/src/views/main/BookingLedger/detail/components/selectView.vue index 705ddd2..c308bf0 100644 --- a/src/views/main/BookingLedger/detail/components/selectView.vue +++ b/src/views/main/BookingLedger/detail/components/selectView.vue @@ -2,7 +2,7 @@
{ - res.data.forEach(item => { - item.shortName = item.agent - item.codeName = item.agentCode - }) - if (res.data.length === 0) { - this.selectList = this.bookingInitData[`${this.type}InitList`] - } else { - this.selectList = res.data - } - this.$store.commit('SET_AgentFilter', res.data) - this.inLoading = false - }) - return false - } - if ( - ![ - 'vessel', - 'subOp', - 'vesselGangjie', - 'lineName', - 'notifypartycountry', - 'consigneecountry', - 'shippercountry', - 'shipperTemplate', - 'notifypartyTemplate', - 'consigneeTemplate' - ].includes(this.type) && - this.bookingInitData[`${this.type}InitList`].length > 0 && - this.searchApi !== 'RelaPortLoadForwarderList' - ) { - this.selectList = this.bookingInitData[`${this.type}InitList`] - return false - } - if (this.openSearch && this.value && this.selectList.length > 0) { - return false - } else if (this.openSearch && this.value && this.selectList.length === 0) { - // 这里需要确认 - 加载全部数据,或者加载已选中数据 - 建议加载全部 - // Object.keys(this.searchQuery).map((item, index) => { - // if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword'].includes(item)) { - // this.searchQuery[item] = this.value - // } - // }) - } + if (this.type === 'forwarder') { this.inLoading = true - this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then(data => { - if (data.rows) { - if (this.type === 'forwarder') { - if (this.agentFilter.length === 0) { - this.selectList = data.rows - } else { - const arr = [] - this.agentFilter.forEach(item => { - data.rows.forEach(ite => { - if (ite.codeName == item.agentCode) { - arr.push(ite) - } - }) - }) - this.selectList = arr - } - } else { - this.selectList = data.rows - } + this.selectList = [] + ListAgentByCarrier({ carrierCode: this.details.carrierid }).then(res => { + res.data.forEach(item => { + item.shortName = item.agent + item.codeName = item.agentCode + }) + if (res.data.length === 0) { + this.selectList = this.bookingInitData[`${this.type}InitList`] } else { - this.selectList = data + this.selectList = res.data } + this.$store.commit('SET_AgentFilter', res.data) this.inLoading = false }) + return false + } + if ( + ![ + 'vessel', + 'subOp', + 'vesselGangjie', + 'lineName', + 'notifypartycountry', + 'consigneecountry', + 'shippercountry', + 'shipperTemplate', + 'notifypartyTemplate', + 'consigneeTemplate' + ].includes(this.type) && + this.bookingInitData[`${this.type}InitList`].length > 0 && + this.searchApi !== 'RelaPortLoadForwarderList' + ) { + this.selectList = this.bookingInitData[`${this.type}InitList`] + return false + } + if (this.openSearch && this.value && this.selectList.length > 0) { + return false + } else if (this.openSearch && this.value && this.selectList.length === 0) { + // 这里需要确认 - 加载全部数据,或者加载已选中数据 - 建议加载全部 + // Object.keys(this.searchQuery).map((item, index) => { + // if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword'].includes(item)) { + // this.searchQuery[item] = this.value + // } + // }) + } + this.inLoading = true + this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then(data => { + if (data.rows) { + if (this.type === 'forwarder') { + if (this.agentFilter.length === 0) { + this.selectList = data.rows + } else { + const arr = [] + this.agentFilter.forEach(item => { + data.rows.forEach(ite => { + if (ite.codeName == item.agentCode) { + arr.push(ite) + } + }) + }) + this.selectList = arr + } + } else { + this.selectList = data.rows + } + } else { + this.selectList = data + } + this.inLoading = false + }) }, handleSearch(e) { diff --git a/src/views/main/DjyTenantConfig/index.vue b/src/views/main/DjyTenantConfig/index.vue index 57556c6..0dfa3f7 100644 --- a/src/views/main/DjyTenantConfig/index.vue +++ b/src/views/main/DjyTenantConfig/index.vue @@ -148,7 +148,7 @@ export default { this.loading = true getDjyTenantConfig({ type: 'booking_default_value' }).then(res => { if (res.code == 200) { - this.loadData = JSON.parse(res.data.configJson) + this.loadData = res.data.configJson ? JSON.parse(res.data.configJson) : '' this.DisplayLoadData = this.loadData } else { this.loadData = [] diff --git a/src/views/main/Taskmanage/BCModify/index.vue b/src/views/main/Taskmanage/BCModify/index.vue index 584fea3..4857ef0 100644 --- a/src/views/main/Taskmanage/BCModify/index.vue +++ b/src/views/main/Taskmanage/BCModify/index.vue @@ -12,91 +12,121 @@ - {{ form.mblNo }} - {{ form.vessel }}/{{ form.voyNo }} - {{ form.placeReceipt }} - {{ form.etd ? form.etd.substring(0, 11) : '-' }} - {{ form.placeDelivery }} - {{ form.eta ? form.eta.substring(0, 11) : '-' }} - {{ form.bookingParty }} - {{ form.contractNo }} - {{ form.siCutDate }} - {{ form.detensionFreeDays }} - {{ form.manifestCutDate }} - {{ form.cyCutoffTime }} - {{ form.mdgfCutDate }} - {{ form.vgmCutoffTime }} - {{ form.ctnStat }} @@ -105,31 +135,41 @@

一程

- {{ form.vessel }}/{{ form.voyNo }} - {{ form.etd ? form.etd.substring(0, 11) : '-' }} - {{ form.portload }} - {{ form.eta ? form.eta.substring(0, 11) : '-' }} - {{ form.portDischarge }} @@ -140,31 +180,41 @@

二程

- {{ form.secondVessel }}/{{ form.secondVoyno }} - {{ form.secondETD ? form.secondETD.substring(0, 11) : '-' }} - {{ form.transferPort1 }} - {{ form.secondETA ? form.secondETA.substring(0, 11) : '-' }} - {{ form.portDischarge }} @@ -178,7 +228,9 @@
- {{ form.bookingSlotId ? '是' : '否' }} @@ -187,7 +239,9 @@ 查看 - {{ form.bookingOrderId ? '是' : '否' }} @@ -196,7 +250,9 @@ 查看 - {{ form.taskStatus == 'Complete' ? '已完成' : '-' }} @@ -208,11 +264,15 @@

关键信息

-

+

{{ item.name }}

@@ -221,7 +281,8 @@
- 订舱变更比对BC存在差异 差异总数:{{ compareResultList.length }}项
@@ -303,10 +364,18 @@ - - {{ item.shortName }} @@ -316,11 +385,20 @@ - - + {{ item.name }} @@ -337,11 +415,18 @@ - + {{ item.name }} @@ -350,11 +435,18 @@ - + {{ item.name }} @@ -363,11 +455,18 @@ - + {{ item.name }} @@ -378,11 +477,18 @@ - + {{ item.name }} @@ -390,13 +496,22 @@ - - + {{ item.name }} @@ -404,13 +519,22 @@ - - + {{ item.name }} @@ -420,7 +544,9 @@ - @@ -428,7 +554,9 @@ - @@ -436,11 +564,17 @@ -
-
+
{{ serive.serviceProjectName }}
@@ -453,8 +587,14 @@ - + {{ item.name }} @@ -841,8 +981,6 @@ export default { } this.ChangeFileRadio() }) - - }, OpenUser() { this.UserId = '' diff --git a/src/views/main/vesselinfo/addForm.vue b/src/views/main/vesselinfo/addForm.vue index 92be22d..db34fad 100644 --- a/src/views/main/vesselinfo/addForm.vue +++ b/src/views/main/vesselinfo/addForm.vue @@ -149,7 +149,7 @@ :filter-option="false" :not-found-content="null" > - + {{ item.enName }} @@ -168,7 +168,7 @@ :filter-option="false" :not-found-content="null" > - + {{ item.enName }} @@ -187,7 +187,7 @@ :filter-option="false" :not-found-content="null" > - + {{ item.enName }} @@ -331,21 +331,21 @@ export default { } if (this.portLoadingData.length) { this.portLoadingData.forEach(item => { - if (item.code == values.portLoadingId) { + if (item.ediCode == values.portLoadingId) { values.portLoading = item.enName } }) } if (this.portTransitData.length) { this.portTransitData.forEach(item => { - if (item.code == values.portTransitId) { + if (item.ediCode == values.portTransitId) { values.portTransit = item.enName } }) } if (this.portDischargeData.length) { this.portDischargeData.forEach(item => { - if (item.code == values.portDischargeId) { + if (item.ediCode == values.portDischargeId) { values.portDischarge = item.enName } }) @@ -429,21 +429,21 @@ export default { } if (this.portLoadingData.length) { this.portLoadingData.forEach(item => { - if (item.code == values.portLoadingId) { + if (item.ediCode == values.portLoadingId) { values.portLoading = item.enName } }) } if (this.portTransitData.length) { this.portTransitData.forEach(item => { - if (item.code == values.portTransitId) { + if (item.ediCode == values.portTransitId) { values.portTransit = item.enName } }) } if (this.portDischargeData.length) { this.portDischargeData.forEach(item => { - if (item.code == values.portDischargeId) { + if (item.ediCode == values.portDischargeId) { values.portDischarge = item.enName } }) diff --git a/src/views/main/vesselinfo/editForm.vue b/src/views/main/vesselinfo/editForm.vue index ef183a4..6e9dfe8 100644 --- a/src/views/main/vesselinfo/editForm.vue +++ b/src/views/main/vesselinfo/editForm.vue @@ -7,32 +7,13 @@ @cancel="handleCancel" > - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - {{ item.enName }} - - - + + + - - - - {{ item.enName }} - - - + + + - - - - {{ item.enName }} - - - + + + - + - + - + - + - + @@ -244,10 +214,18 @@ import { GetVessellist, GetYardlist } from '@/api/modular/main/vesselinfo' +import selectView from '../BookingLedger/detail/components/selectView.vue' export default { data() { return { TypeData: [], + rules: { + voynoInside: [{ required: true, message: '请输入内部航次!', trigger: 'blur' }], + etd: [{ required: true, message: '请选择开船日期', trigger: 'blur' }], + voyno: [{ required: true, message: '请输入航次', trigger: 'blur' }], + carrierid: [{ required: true, message: '请选择船公司', trigger: 'blur' }], + vessel: [{ required: true, message: '请选择船名', trigger: 'blur' }] + }, labelCol: { xs: { span: 24 }, sm: { span: 6 } @@ -276,114 +254,36 @@ export default { yardData: [] } }, + components: { + selectView + }, mounted() {}, methods: { // 初始化方法 edit(record) { this.data = record - console.log(record) this.visible = true setTimeout(() => { - this.form.setFieldsValue({ - tenantId: record.tenantId, - vessel: record.vessel, - voyno: record.voyno, - portLoadingId: record.portLoadingId, - portTransitId: record.portTransitId, - portDischargeId: record.portDischargeId, - portLoading: record.portLoading, - portTransit: record.portTransit, - portDischarge: record.portDischarge, - etd: record.etd, - closingDate: record.closingDate, - eta: record.eta, - yard: record.yard, - ygtETD: record.ygtETD, - yardCode: record.yardCode, - atd: record.atd, - carrierid: record.carrierid, - voynoInside: record.voynoInside, - closeDocTime: record.closeDocTime - }) - console.log(this.form.getFieldsValue()) + this.form = record + this.$forceUpdate() }, 100) }, - handleCopySave() { - const { - form: { validateFields } - } = this - this.confirmLoading = true - validateFields((errors, values) => { - console.log(errors, values) - if (!errors) { - for (const key in values) { - console.log(key, 1) - if (typeof values[key] === 'object' && !(values[key] === null)) { - values[key] = JSON.stringify(values[key]) - } - } - if (!values.carrier) { - values.carrier = this.data.carrier - } - values.id = this.data.id - if (this.portLoadingData.length) { - this.portLoadingData.forEach(item => { - if (item.code == values.portLoadingId) { - values.portLoading = item.enName - } - }) - } - if (this.portTransitData.length) { - this.portTransitData.forEach(item => { - if (item.code == values.portTransitId) { - values.portTransit = item.enName - } - }) - } - if (this.portDischargeData.length) { - this.portDischargeData.forEach(item => { - if (item.code == values.portDischargeId) { - values.portDischarge = item.enName - } - }) - } - if (this.carrierData.length) { - this.carrierData.forEach(item => { - if (item.code == values.carrierid) { - values.carrier = item.cnName - } - }) - } - if (this.yardData.length) { - this.yardData.forEach(item => { - if (item.code == values.yardCode) { - values.yard = item.name - } - }) - } - DjyVesselInfoServiceAddOrUpdate(values) - .then(res => { - if (res.success) { - this.$message.success('编辑成功') - this.confirmLoading = false - this.$emit('ok', values) - this.editRow(values) - } else { - this.$message.error(`编辑失败,${res.message}`) - } - }) - .finally(res => { - this.confirmLoading = false - }) - } else { - this.confirmLoading = false - } - }) + getSelectViewRes({ type, res }) { + if (type === 'portloadid') { + this.form.portLoadingId = res.ediCode + } + if (type === 'portdischargeid') { + this.form.portDischargeId = res.ediCode + } + if (type === 'transportid') { + this.form.portTransitId = res.ediCode + } }, + editRow(record) { this.data = record setTimeout(() => { - this.form.setFieldsValue({ + this.form = { vessel: record.vessel, voyno: record.voyno, portTransitId: record.portTransitId, @@ -402,14 +302,10 @@ export default { carrierid: record.carrierid, voynoInside: record.voynoInside, closeDocTime: record.closeDocTime - }) + } + this.$forceUpdate() }, 100) }, - // tenantSearch(data) { - // SysTenantPage({ Name: data }).then(res => { - // this.tenantData = res.data.rows - // }) - // }, portLoadingSearch(data) { GetPortloadlist({ KeyWord: data }).then(res => { this.portLoadingData = res.data @@ -440,80 +336,74 @@ export default { this.yardData = res.data }) }, - handleSubmit() { - const { - form: { validateFields } - } = this - this.confirmLoading = true - validateFields((errors, values) => { - console.log(errors, values) - if (!errors) { - for (const key in values) { - console.log(key, 1) - if (typeof values[key] === 'object' && !(values[key] === null)) { - values[key] = JSON.stringify(values[key]) - } + handleSubmit(isCopy) { + this.$refs.ruleForm.validate(valid => { + if (valid) { + if (!this.form.carrier) { + this.form.carrier = this.data.carrier } - if (!values.carrier) { - values.carrier = this.data.carrier - } - values.id = this.data.id if (this.portLoadingData.length) { this.portLoadingData.forEach(item => { - if (item.code == values.portLoadingId) { - values.portLoading = item.enName + if (item.ediCode == this.form.portLoadingId) { + this.form.portLoading = item.enName } }) } if (this.portTransitData.length) { this.portTransitData.forEach(item => { - if (item.code == values.portTransitId) { - values.portTransit = item.enName + if (item.ediCode == this.form.portTransitId) { + this.form.portTransit = item.enName } }) } if (this.portDischargeData.length) { this.portDischargeData.forEach(item => { - if (item.code == values.portDischargeId) { - values.portDischarge = item.enName + if (item.ediCode == this.form.portDischargeId) { + this.form.portDischarge = item.enName } }) } if (this.carrierData.length) { this.carrierData.forEach(item => { - if (item.code == values.carrierid) { - values.carrier = item.cnName + if (item.code == this.form.carrierid) { + this.form.carrier = item.cnName } }) } if (this.yardData.length) { this.yardData.forEach(item => { - if (item.code == values.yardCode) { - values.yard = item.name + if (item.code == this.form.yardCode) { + this.form.yard = item.name } }) } - DjyVesselInfoServiceAddOrUpdate(values) + if (!isCopy) { + this.form.id = this.data.id + } + this.confirmLoading = true + DjyVesselInfoServiceAddOrUpdate(this.form) .then(res => { if (res.success) { this.$message.success('编辑成功') this.confirmLoading = false - this.$emit('ok', values) - this.handleCancel() + this.$emit('ok', this.form) + if (isCopy) { + this.editRow(this.form) + } else { + this.handleCancel() + } } else { this.$message.error(`编辑失败,${res.message}`) } + this.confirmLoading = false }) .finally(res => { this.confirmLoading = false }) - } else { - this.confirmLoading = false } }) }, handleCancel() { - this.form.resetFields() this.visible = false } } diff --git a/src/views/main/vesselinfo/index.vue b/src/views/main/vesselinfo/index.vue index 0a3731c..c6dbfde 100644 --- a/src/views/main/vesselinfo/index.vue +++ b/src/views/main/vesselinfo/index.vue @@ -276,6 +276,12 @@ export default { field: 'portLoading', width: 150 }, + { + title: '装货港代码', + align: 'center', + field: 'portLoadingId', + width: 150 + }, { title: '中转港', align: 'center', @@ -374,7 +380,6 @@ export default { }) }, - confirm(e) { this.FnDel(e) },